Skip to content

Commit

Permalink
Fix test failure on spec/ruby/language/pattern_matching_spec.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
k-tsj committed Aug 19, 2021
1 parent ecb6d6a commit f96c199
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions spec/ruby/language/pattern_matching_spec.rb
Expand Up @@ -1138,12 +1138,15 @@ def ===(obj)

ruby_version_is "3.1" do
it "can omit parentheses in one line pattern matching" do
[1, 2] => a, b
a.should == 1
b.should == 2
eval(<<~RUBY).should == [1, 2]
[1, 2] => a, b
[a, b]
RUBY

{a: 1} => a:
a.should == 1
eval(<<~RUBY).should == 1
{a: 1} => a:
a
RUBY
end
end
end
Expand Down

0 comments on commit f96c199

Please sign in to comment.