summaryrefslogtreecommitdiff
path: root/spec/ruby/language/pattern_matching_spec.rb
diff options
context:
space:
mode:
authorKazuki Tsujimoto <kazuki@callcc.net>2021-08-19 17:28:30 +0900
committerKazuki Tsujimoto <kazuki@callcc.net>2021-08-19 17:28:30 +0900
commitf96c1994498ea0debabb3e9ab60738b79fc6c6ba (patch)
tree41f9d712992f55d2a10fe078ffe0ab0a1594a089 /spec/ruby/language/pattern_matching_spec.rb
parentecb6d6a4ef058b5598a7633c3921eeab08ce11c6 (diff)
Fix test failure on spec/ruby/language/pattern_matching_spec.rb
https://github.com/ruby/ruby/runs/3369486308
Diffstat (limited to 'spec/ruby/language/pattern_matching_spec.rb')
-rw-r--r--spec/ruby/language/pattern_matching_spec.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/spec/ruby/language/pattern_matching_spec.rb b/spec/ruby/language/pattern_matching_spec.rb
index e9fc4f557d..c6a3008458 100644
--- a/spec/ruby/language/pattern_matching_spec.rb
+++ b/spec/ruby/language/pattern_matching_spec.rb
@@ -1138,12 +1138,15 @@ ruby_version_is "2.7" do
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