Commit graph

20692 commits

Author SHA1 Message Date
yui-knk
7e604a0263 Fix SEGV when ripper hits backref_error on command_asgn or arg 2024-05-11 20:47:15 +09:00
tomoya ishida
68b6fe7048 [ruby/reline] Avoid STDIN.winsize called in require "reline"
(https://github.com/ruby/reline/pull/703)

21891c47c4
2024-05-10 17:19:42 +00:00
Kevin Newton
2e4f3739fb [PRISM] Enable passing argument forwarding tests 2024-05-10 13:09:16 -04:00
Kevin Newton
83f481ebf0 [ruby/prism] Enhance parameter forwarding error messages
826657232e
2024-05-10 15:54:15 +00:00
Kevin Newton
955f13238d [PRISM] Enable passing IRB tests 2024-05-10 11:48:11 -04:00
Kevin Newton
2e44664547 [ruby/prism] operator rename
b5e47f5c42
2024-05-10 11:47:48 -04:00
Stan Lo
c68bb24088 [ruby/irb] Add a new initialization step to validate IRB.conf's
values
(https://github.com/ruby/irb/pull/953)

Currently, users can only find out that they have set a wrong value
for IRB configs when the value is used, with opaque error messages like
"comparison of Integer with true failed (TypeError)".

This commit adds a new initialization step to validate the values of
some IRB configs, so that users can find out about the wrong values
during the initialization of IRB.

af8ef2948b
2024-05-10 11:40:58 +00:00
Kevin Newton
2f915e729a [PRISM] Enable passing test_string 2024-05-10 00:54:31 -04:00
Kevin Newton
444030fc61 [PRISM] Enable passing tests 2024-05-09 09:38:43 -04:00
Jean Boussier
e82138e48a Stabilize TestObjSpace#test_dump_special_consts
The test assumes `:foo` is a static symbol, but that is only true
if a literal `:foo` was parsed before `"foo".to_sym` was evaled:

```ruby
require 'objspace'
foo_sym = "foo".to_sym
puts ObjectSpace.dump(eval(":foo"))
```

```
{"address":"0x100fb46d0", "type":"SYMBOL", "shape_id":10, "slot_size":40, "class":"0x100d3e9c8", "frozen":true, "bytesize":3, "value":"foo", "memsize":40, "flags":{"wb_protected":true, "marking":true, "marked":true}}
```
2024-05-09 12:23:34 +02:00
tomoya ishida
26446cccc9 [ruby/reline] Implement bracketed paste insert
(https://github.com/ruby/reline/pull/655)

e92dcbf514
2024-05-08 16:00:30 +00:00
Kevin Newton
06a1df3ef9 [PRISM] Enable more passing tests 2024-05-08 10:18:57 -04:00
Kevin Newton
ba062a6231 [PRISM] Use correct warning encoding 2024-05-08 08:12:17 -04:00
Nobuyoshi Nakada
5bb656e4f0
[Bug #20474] Keep spaces in leading blank line 2024-05-08 19:25:37 +09:00
Samuel Giddins
841b45a442 [ruby/openssl] Add to_text for PKCS7 and Timestamp::Response
71cd1e3f5c
2024-05-08 09:39:13 +00:00
Kevin Newton
b4b39a6199 [PRISM] Enable test_methoddef_endless_command 2024-05-07 14:24:31 -04:00
Kevin Newton
2bfc48755e [PRISM] Enable more passing tests 2024-05-07 14:24:31 -04:00
Kevin Newton
21b94ae0d1 [ruby/prism] Extend error message for unterminated HEREDOC
c1b07ec11b
2024-05-07 18:03:03 +00:00
Kevin Newton
eb8efa42f0 [ruby/prism] shareable_constant_value line warnings
8c984b6922
2024-05-07 14:56:48 +00:00
Yuta Saito
80adf6a18c [rubygems/rubygems] Accept WASI as an OS name in Gem::Platform
1209d3c6b0
2024-05-07 05:36:35 +00:00
Kevin Newton
481e16d58b [PRISM] Support for compiling ractor constant path writes 2024-05-06 19:06:13 -04:00
David Rodriguez
00b1553dc6 [rubygems/rubygems] Remove more unnecessary compatibility code
00d91f141b
2024-05-06 17:06:50 +00:00
Kevin Newton
e276929511 [PRISM] Enable test_unexpected_fraction 2024-05-06 12:09:48 -04:00
Kevin Newton
5e6bb0857a [PRISM] Enable passing forwarding parameter tests 2024-05-06 12:09:30 -04:00
Kevin Newton
14d400829d
[PRISM] Enable passing test_brace_after_literal_argument test 2024-05-06 11:12:30 -04:00
Stan Lo
e973f9cbb3 [ruby/irb] Clarify that the context is IRB context
(https://github.com/ruby/irb/pull/950)

8cde57f55a
2024-05-05 10:44:52 +00:00
Jean Boussier
7d42010fad [ruby/openssl] read: don't clear buffer when nothing can be read
To be consistent with regular Ruby IOs:

```ruby
r, _ = IO.pipe
buf = "garbage".b
r.read_nonblock(10, buf, exception: false) # => :wait_readable
p buf # => "garbage"
```

Ref: 98b8944460

08452993d6
2024-05-05 08:00:00 +00:00
tomoya ishida
d679afe9f9 [ruby/reline] Add name defined in readline to completion key
bindings C-i C-p C-n
(https://github.com/ruby/reline/pull/698)

1314787bbb
2024-05-05 07:09:52 +00:00
Stan Lo
bd42f0898d [ruby/irb] Improve help message for no meta commands
(https://github.com/ruby/irb/pull/948)

* Remove unnecessary code from command tests

* Improve help message for no meta commands

1. Add placeholder values for both command category and description
2. Update help command's output to give different types of categories
   more explicit ordering

b1ef58aeff
2024-05-04 03:32:34 +00:00
Stan Lo
fb2ea7084f [ruby/irb] Use flag instead of caller for debug's binding.irb
check
(https://github.com/ruby/irb/pull/947)

4a4d7a4279
2024-05-04 03:22:17 +00: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

---------

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)

f2b5fc192f
2024-05-03 21:34:34 +00:00
Kevin Newton
d4a6d0c177 [ruby/prism] Prism::Location#adjoin
a298db68e3
2024-05-03 19:14:03 +00:00
Kevin Newton
7a49edcf1f [ruby/prism] Prism::Node#tunnel
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
31c69698a7 [PRISM] Enable passing test for **nil 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
e950dc1e83
2024-05-03 13:01:40 -04:00
Nobuyoshi Nakada
91485d7dc6
Adjust indent [ci skip] 2024-05-04 01:15:09 +09: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.

45676af80d
2024-05-03 15:12:55 +00: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.

9cbe74464e
2024-05-03 11:11:57 -04:00
Jenny Shen
c1b11c50cb [rubygems/rubygems] Rename credential email to identifier in WebAuthn poller
5e3e55f8bc
2024-05-03 10:54:27 +00:00
Nobuyoshi Nakada
9f8e87c44b
Test for win32/registry.rb 2024-05-03 14:47:18 +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
Kevin Newton
e34c131ce8 [PRISM] Disallow redundant returns from being line events 2024-05-02 15:16:15 -04:00
Stan Lo
945a99e81a Sync IRB 241e061 2024-05-02 14:33:30 -04:00
Kevin Newton
0981f03008 [PRISM] Enable newline test 2024-05-02 12:29:25 -04:00
tomoya ishida
c78cebb469 [ruby/reline] Fix default and additional key bindings vanish bug
(https://github.com/ruby/reline/pull/697)

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