[#109095] [Ruby master Misc#18888] Migrate ruby-lang.org mail services to Google Domains and Google Workspace — "shugo (Shugo Maeda)" <noreply@...>
Issue #18888 has been reported by shugo (Shugo Maeda).
16 messages
2022/06/30
[ruby-core:109076] [Ruby master Bug#18878] parse.y: Foo::Bar {} is inconsistently rejected
From:
"qnighy (Masaki Hara)" <noreply@...>
Date:
2022-06-28 03:38:50 UTC
List:
ruby-core #109076
Issue #18878 has been updated by qnighy (Masaki Hara).
> Is there a more descriptive error message, or is `SyntaxError` the only output provided?
This is the actual error message:
```
% ruby -e 'Foo::Bar {}'
-e:1: syntax error, unexpected '{'
Foo::Bar {}
```
----------------------------------------
Bug #18878: parse.y: Foo::Bar {} is inconsistently rejected
https://bugs.ruby-lang.org/issues/18878#change-98222
* Author: qnighy (Masaki Hara)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
The following source doesn't parse:
```ruby
Foo::Bar {}
```
despite the following:
```ruby
bar # local variable or method call
Bar # constant
bar() # method call
Bar() # method call
bar {} # method call
Bar {} # method call
bar() {} # method call
Bar() {} # method call
Foo::bar # method call
Foo::Bar # constant
Foo::bar() # method call
Foo::Bar() # method call
Foo::bar {} # method call
# Foo::Bar {} # SyntaxError
Foo::bar() {} # method call
Foo::Bar() {} # method call
```
Especially considering `Bar {}`, this looks like a missing implementation rather than an intentional behavior.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>