[#109207] [Ruby master Feature#18915] New error class: NotImplementedYetError or scope change for NotImplementedYet — Quintasan <noreply@...>
Issue #18915 has been reported by Quintasan (Michał Zając).
18 messages
2022/07/14
[ruby-core:109113] [Ruby master Bug#18890] parse.y: pattern label is newline-sensitive if it is dynamic
From:
"qnighy (Masaki Hara)" <noreply@...>
Date:
2022-07-02 01:48:19 UTC
List:
ruby-core #109113
Issue #18890 has been reported by qnighy (Masaki Hara).
----------------------------------------
Bug #18890: parse.y: pattern label is newline-sensitive if it is dynamic
https://bugs.ruby-lang.org/issues/18890
* 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 two patterns in the code below behave differently:
```ruby
def f(obj)
case obj
in foo:
0
true
in "bar":
0
true
else
false
end
end
p f({ foo: 42 }) # => true
p f({ bar: 42 }) # => false
```
which does not seem an intended 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>