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.
Actions
Like0
Like0Like0