diff options
| author | Earlopain <14981592+Earlopain@users.noreply.github.com> | 2025-10-27 11:24:45 +0100 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-10-30 13:05:51 +0000 |
| commit | 99382f7461db80497b69df84ac52fab6710ba160 (patch) | |
| tree | 8818bb2379fe557e13f6fdc304febdf875f31602 /test/prism/ruby/ruby_parser_test.rb | |
| parent | d5fbff50c7ff880ae71b8a8ae9aad976c69bea73 (diff) | |
[ruby/prism] Unescape unary method calls
Followup to https://github.com/ruby/prism/pull/2213
Before:
```sh
$ ruby -ve "puts 42.~@"
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/prism/commit/dbd83256b1) +PRISM [x86_64-linux]
-e:1:in '<main>': undefined method '~@' for an instance of Integer (NoMethodError)
Did you mean? ~
```
After (matches parse.y):
```sh
$ ./miniruby -ve "puts 42.~@"
ruby 3.5.0dev (2025-10-16T03:40:45Z master https://github.com/ruby/prism/commit/1d95d75c3f) +PRISM [x86_64-linux]
-43
```
https://github.com/ruby/prism/commit/a755bf228f
Diffstat (limited to 'test/prism/ruby/ruby_parser_test.rb')
| -rw-r--r-- | test/prism/ruby/ruby_parser_test.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/prism/ruby/ruby_parser_test.rb b/test/prism/ruby/ruby_parser_test.rb index 7640ddaf1c..42a888be82 100644 --- a/test/prism/ruby/ruby_parser_test.rb +++ b/test/prism/ruby/ruby_parser_test.rb @@ -57,6 +57,7 @@ module Prism "spanning_heredoc.txt", "symbols.txt", "tilde_heredocs.txt", + "unary_method_calls.txt", "unparser/corpus/literal/literal.txt", "while.txt", "whitequark/cond_eflipflop.txt", |
