-
Notifications
You must be signed in to change notification settings - Fork 170
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Hey folks,
Been getting an odd NoMatchingPatternError
on Ruby 3.4.3 and Prism 1.4.0 (same on latest main
at 2cae310)
# script.rb
module A
extend self
def print(message:)
puts message
end
end
case ENV['COND']
in 'FOO'
message = 'foo'
A.print message:
in 'BAR'
message = 'bar'
A.print message:
end
→ RUBYOPT="--parser prism" COND="BAR" ruby script.rb
script.rb:13:in '<main>': "BAR": "FOO" === "BAR" does not return true (NoMatchingPatternError)
Additionally, matching both conditions
→ RUBYOPT="--parser prism" COND="FOO" ruby script.rb
foo
bar
No issues with parse.y
→ RUBYOPT="--parser parse.y" COND="BAR" ruby script.rb
bar
→ RUBYOPT="--parser parse.y" COND="FOO" ruby script.rb
foo
mitio
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working