85378 Commits

Author SHA1 Message Date
yui-knk
cf74ff714a Change return value of gets function to be rb_parser_string_t * instead of VALUE
This change reduces parser's dependency on ruby object.
2024-05-04 11:59:10 +09:00
Kenichi Kamiya
a510175e8f [ruby/irb] Avoid raising errors while running help for custom
commands
(https://github.com/ruby/irb/pull/944)

* Avoid raising errors while running help for custom commands

Raising an error from the help command is not a pleasure for the
end user, even if the command does not define any attributes

* Update test/irb/command/test_custom_command.rb

---------

https://github.com/ruby/irb/commit/c8bba9f8dc

Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-05-03 22:08:49 +00:00
Kenichi Kamiya
70db150fbc [ruby/irb] Fix typos in test/irb/command/test_custom_command.rb
(https://github.com/ruby/irb/pull/945)

https://github.com/ruby/irb/commit/f2b5fc192f
2024-05-03 21:34:34 +00:00
Kevin Newton
d4a6d0c177 [ruby/prism] Prism::Location#adjoin
https://github.com/ruby/prism/commit/a298db68e3
2024-05-03 19:14:03 +00:00
Kevin Newton
7a49edcf1f [ruby/prism] Prism::Node#tunnel
https://github.com/ruby/prism/commit/0bf5d651da
2024-05-03 18:37:19 +00:00
Kevin Newton
c631679b94
[PRISM] Disallow &. in MLHS 2024-05-03 14:15:59 -04:00
Kevin Newton
1af2dead5a [ruby/prism] Disallow *a&.x=0
https://github.com/ruby/prism/commit/624fdf74bd
2024-05-03 18:14:55 +00:00
Vinicius Stock
4fbb208185 [ruby/prism] Create specialized ASCIISource with asciionly optimizations
https://github.com/ruby/prism/commit/40993166a8
2024-05-03 18:10:21 +00:00
Kevin Newton
31361aeca3 [ruby/prism] Disallow safe navigation in a call target node
https://github.com/ruby/prism/commit/b1917adac7
2024-05-03 18:09:35 +00:00
Kevin Newton
31c69698a7 [PRISM] Enable passing test for **nil 2024-05-03 13:32:32 -04:00
Kevin Newton
2368dab1fa [ruby/prism] Disallow **nil after keyword parameters
https://github.com/ruby/prism/commit/5beeae076f
2024-05-03 13:32:32 -04:00
Kevin Newton
461d6d441f [PRISM] Enable RubyVM tests for prism 2024-05-03 13:11:09 -04:00
Kevin Newton
56672c8b18 [PRISM] Enable passing tests for index expressions 2024-05-03 13:01:40 -04:00
Kevin Newton
7caeff2bae [ruby/prism] Disallow keywords and blocks in index expressions
https://github.com/ruby/prism/commit/e950dc1e83
2024-05-03 13:01:40 -04:00
Nobuyoshi Nakada
b6625d38d8
[DOC] Fix the description about the timing finalizers will be called 2024-05-04 01:34:35 +09:00
Nobuyoshi Nakada
91485d7dc6
Adjust indent [ci skip] 2024-05-04 01:15:09 +09:00
Kevin Newton
97654bee49 [ruby/prism] Remove deprecated #child usage
https://github.com/ruby/prism/commit/14d9b431e2
2024-05-03 16:02:13 +00:00
David Rodriguez
281df1e495 [rubygems/rubygems] Remove Gem::Specification#mark_version
This gets in the middle if we ever start allowing to build as if using a
different RubyGems version than the one being run.

This could be useful to make `gem rebuild` a little more usable, and
it's already done by Bundler specs which already make this method a noop
when they need this.

I'm not sure forcefully setting this, even if user explicitly specified
something else is helpful.

Since this could potentially prevent gems explicitly setting a constant
RubyGems version from building, I changed the error of incorrect
RubyGems version from a hard error to a warning, since it will start
happening in those cases if we stop overwriting the version.

https://github.com/rubygems/rubygems/commit/45676af80d
2024-05-03 15:12:55 +00:00
Kevin Newton
0948b6a592 [PRISM] Use new constant path structure 2024-05-03 11:11:57 -04:00
Kevin Newton
5758e45657 [ruby/prism] Change ConstantPathNode#child to ConstantPathNode#{name,name_loc}
This has been requested for a long time, and I'm finally doing it
now. Unfortunately this is a breaking change for all of the APIs.

I've added in a Ruby method for `#child` that is deprecated so that
existing usage doesn't break, but for everyone else this is going
to be a bit of a pain.

https://github.com/ruby/prism/commit/9cbe74464e
2024-05-03 11:11:57 -04:00
Kevin Newton
1d51e929b1 [ruby/prism] Assume eval context for ruby_parser and ripper
https://github.com/ruby/prism/commit/e4d6984892
2024-05-03 13:12:27 +00:00
Earlopain
32b1dea566 [ruby/prism] Assume an eval context for Prism::Translation::Parser
This is similar to https://github.com/davidwessman/syntax_tree-erb/issues/81 but for RuboCop
The parser gem doesn't support these types of checks,
see https://github.com/whitequark/parser?tab=readme-ov-file#syntax-check-of-block-exits

While this is technically a bug in the parser gem, it does increase compatibility
and allows prism to be used when linting erb or haml with a RuboCop extension.

https://github.com/ruby/prism/commit/6c59ae6a00
2024-05-03 12:53:01 +00:00
Kevin Newton
7c029f612f [ruby/prism] Remove generics from sorbet types
https://github.com/ruby/prism/commit/080d84fd03
2024-05-03 12:36:57 +00:00
Jenny Shen
c1b11c50cb [rubygems/rubygems] Rename credential email to identifier in WebAuthn poller
https://github.com/rubygems/rubygems/commit/5e3e55f8bc
2024-05-03 10:54:27 +00:00
Nobuyoshi Nakada
7662e6fcd5
win32/registry: Shorten with safe navigation operator 2024-05-03 14:49:29 +09:00
Nobuyoshi Nakada
491c38bfcd
win32/registry: Make frozen_string_literal true 2024-05-03 14:49:29 +09:00
Nobuyoshi Nakada
0b091e6675
win32/registry: Refine pack/unpack
* Use 'J' for HANDLE.
* Use 'Q' for QWORD.
* Define template constants.
* Supply zero bytes in `unpackqw` as well as `unpackdw`.
* Use `String#unpack1`.
2024-05-03 14:49:29 +09:00
Nobuyoshi Nakada
9f8e87c44b
Test for win32/registry.rb 2024-05-03 14:47:18 +09:00
yui-knk
899d9f79dd Rename vast to ast_value
There is an English word "vast".
This commit changes the name to be more clear name to avoid confusion.
2024-05-03 12:40:35 +09:00
ydah
e1905ca180 Use user defined parameterizing rules f_optarg(value) 2024-05-03 12:05:21 +09:00
Kevin Newton
5409661fe6 Mark the first string element of a regexp as binary if US-ASCII 2024-05-02 22:46:09 -04:00
Peter Zhu
b5cefa79dd Fix GC_DEBUG 2024-05-02 17:32:43 -04:00
Peter Zhu
6d605f1e50 Move rvalue_overhead out of RVALUE
Since we cannot read the rvalue_overhead out of the RVALUE anyways (since
it is at the end of the slot), it makes more sense to move it out of
the RVALUE.
2024-05-02 17:32:43 -04:00
Kevin Newton
e34c131ce8 [PRISM] Disallow redundant returns from being line events 2024-05-02 15:16:15 -04:00
Stan Lo
c681af3e5d Reject empty lines in IRB binding spec
For that particular spec, the empty lines' presence is not relevant.
So let's remove them to make the spec easier to maintain.
2024-05-02 14:33:30 -04:00
Stan Lo
945a99e81a Sync IRB 241e061 2024-05-02 14:33:30 -04:00
Matt Valentine-House
c59abb9999 Rename ary_heap_alloc -> ary_heap_alloc_buffer
To differentiate it from ary_alloc_heap
2024-05-02 19:28:23 +01:00
Kevin Newton
0981f03008 [PRISM] Enable newline test 2024-05-02 12:29:25 -04:00
git
0968b462b6 Update default gems list at 008f2b9b6a8575c4380732f5ac4ee1 [ci skip] 2024-05-02 16:29:17 +00:00
Mari Imaizumi
008f2b9b6a [ruby/reline] Bump version to 0.5.5
(https://github.com/ruby/reline/pull/696)

https://github.com/ruby/reline/commit/8bf71d0b81
2024-05-02 16:28:19 +00:00
tomoya ishida
032070d793 [ruby/irb] Add workaround for ruby/debug/test/console/irb_test
failing with StdioInputMethod
(https://github.com/ruby/irb/pull/943)

https://github.com/ruby/irb/commit/acf3c1816e
2024-05-02 16:21:46 +00:00
Kevin Newton
7c0cf71049 [ruby/prism] Node#script_lines and supporting infra
https://github.com/ruby/prism/commit/cb4a8ab772
2024-05-02 15:27:18 +00:00
Kevin Newton
398453c3c0 [PRISM] Fix param names for repeated splats 2024-05-02 11:27:05 -04:00
tomoya ishida
c78cebb469 [ruby/reline] Fix default and additional key bindings vanish bug
(https://github.com/ruby/reline/pull/697)

https://github.com/ruby/reline/commit/fc9b4d2274
2024-05-02 14:41:07 +00:00
Kevin Newton
2eefbef2ee [PRISM] Enable test_ast.rb 2024-05-02 10:34:10 -04:00
Kevin Newton
41977ef595 [PRISM] Enable Socket.gethostbyaddr spec 2024-05-02 10:29:17 -04:00
Peter Zhu
e7d20623cb Add comments in setproctitle.c 2024-05-02 10:12:58 -04:00
Peter Zhu
4f69d318b8 Keep track of the originally allocated environ
We need to keep a pointer to the originally allocated environ because
adding more environment variables can cause it to be changed to something
else.

For example:

    100.times do |i|
      ENV["FOO#{i}"] = "1"
    end

Causes Valgrind to report:

    312 bytes in 1 blocks are definitely lost in loss record 9 of 13
      at 0x484D444: calloc (vg_replace_malloc.c:1340)
      by 0x1884F8: calloc1 (gc.c:1844)
      by 0x1884F8: objspace_xcalloc (gc.c:12202)
      by 0x1884F8: ruby_xcalloc_body (gc.c:12209)
      by 0x4204DD: ruby_init_setproctitle (setproctitle.c:119)
      by 0x27DDF4: ruby_process_options (ruby.c:3101)
      by 0x160BD1: ruby_options (eval.c:117)
      by 0x15B96E: rb_main (main.c:40)
      by 0x15B96E: main (main.c:59)
2024-05-02 10:12:58 -04:00
Nobuyoshi Nakada
12cbfd8e2f
Declare as NORETURN 2024-05-02 22:11:15 +09:00
jinroq
a3726c028d Fixed missing support for d75bbba255. 2024-05-02 05:36:14 -04:00