Actions
Bug #18890
closedparse.y: pattern label is newline-sensitive if it is dynamic
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]
Description
The two patterns in the code below behave differently:
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.
Updated by nobu (Nobuyoshi Nakada) over 2 years ago
Updated by nobu (Nobuyoshi Nakada) over 2 years ago
- Status changed from Open to Closed
Applied in changeset git|eaeb130b11fefe91aaf61f294ea32af76dada74f.
[Bug #18890] newline should be insignificant after pattern label
Actions
Like0
Like0Like0