[#101179] Spectre Mitigations — Amel <amel.smajic@...>
Hi there!
5 messages
2020/12/01
[#101694] Ruby 3.0.0 Released — "NARUSE, Yui" <naruse@...>
V2UgYXJlIHBsZWFzZWQgdG8gYW5ub3VuY2UgdGhlIHJlbGVhc2Ugb2YgUnVieSAzLjAuMC4gRnJv
4 messages
2020/12/25
[ruby-core:101503] [Ruby master Bug#17398] SyntaxError in endless method
From:
mame@...
Date:
2020-12-18 01:58:14 UTC
List:
ruby-core #101503
Issue #17398 has been updated by mame (Yusuke Endoh).
The following patch allows `def foo() = puts "bar"`. It brings no parser conflict.
https://gist.github.com/mame/0773bf3938e046e2b608de5fb2a826c8
However, it is not perfect. `private def foo() = puts "foo"` does not parse.
`private var = puts "bar"` is not allowed neither, so I have no idea how to allow this.
----------------------------------------
Bug #17398: SyntaxError in endless method
https://bugs.ruby-lang.org/issues/17398#change-89283
* Author: zverok (Victor Shepelev)
* Status: Open
* Priority: Normal
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
This works:
```ruby
def foo() = puts("bar")
```
This does not:
```ruby
def foo() = puts "bar"
# ^ syntax error, unexpected string literal, expecting `do' or '{' or '('
```
Is this intentional or accidental? Not sure how it is reasoned.
--
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>