Skip to content

Unescape unary method calls#3694

Merged
kddnewton merged 1 commit into
ruby:mainfrom
Earlopain:escape-unary-method-calls
Oct 30, 2025
Merged

Unescape unary method calls#3694
kddnewton merged 1 commit into
ruby:mainfrom
Earlopain:escape-unary-method-calls

Conversation

@Earlopain

Copy link
Copy Markdown
Collaborator

Followup to #2213

Before:

$ ruby -ve "puts 42.~@"
ruby 3.4.6 (2025-09-16 revision dbd83256b1) +PRISM [x86_64-linux]
-e:1:in '<main>': undefined method '~@' for an instance of Integer (NoMethodError)
Did you mean?  ~

After (matches parse.y):

$ ./miniruby -ve "puts 42.~@"
ruby 3.5.0dev (2025-10-16T03:40:45Z master 1d95d75c3f) +PRISM [x86_64-linux]
-43

Followup to ruby#2213

Before:
```sh
$ ruby -ve "puts 42.~@"
ruby 3.4.6 (2025-09-16 revision 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 1d95d75c3f) +PRISM [x86_64-linux]
-43
```
@kddnewton
kddnewton merged commit a192db5 into ruby:main Oct 30, 2025
62 checks passed
@Earlopain
Earlopain deleted the escape-unary-method-calls branch December 3, 2025 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants