diff options
author | tompng <[email protected]> | 2024-06-08 00:23:12 +0900 |
---|---|---|
committer | Yusuke Endoh <[email protected]> | 2024-10-03 18:47:09 +0900 |
commit | 7237af75d2aa700454fbaba9bda7a9283413d903 (patch) | |
tree | 9a3d57943a0d60786dc93f5b2ed6e24ea8c9e757 /test/ruby/test_pattern_matching.rb | |
parent | f4e548924e36c9b1d19551a943881cb57bb41471 (diff) |
Update ruby test for colon-style hash inspect
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/10924
Diffstat (limited to 'test/ruby/test_pattern_matching.rb')
-rw-r--r-- | test/ruby/test_pattern_matching.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/ruby/test_pattern_matching.rb b/test/ruby/test_pattern_matching.rb index cfe3bd1e19..92a3244fc2 100644 --- a/test/ruby/test_pattern_matching.rb +++ b/test/ruby/test_pattern_matching.rb @@ -1664,7 +1664,7 @@ END raise a # suppress "unused variable: a" warning end - assert_raise_with_message(NoMatchingPatternKeyError, "{:a=>0}: key not found: :aa") do + assert_raise_with_message(NoMatchingPatternKeyError, "{a: 0}: key not found: :aa") do {a: 0} => {aa:} raise aa # suppress "unused variable: aa" warning rescue NoMatchingPatternKeyError => e @@ -1673,7 +1673,7 @@ END raise e end - assert_raise_with_message(NoMatchingPatternKeyError, "{:a=>{:b=>0}}: key not found: :bb") do + assert_raise_with_message(NoMatchingPatternKeyError, "{a: {b: 0}}: key not found: :bb") do {a: {b: 0}} => {a: {bb:}} raise bb # suppress "unused variable: bb" warning rescue NoMatchingPatternKeyError => e @@ -1682,15 +1682,15 @@ END raise e end - assert_raise_with_message(NoMatchingPatternError, "{:a=>0}: 1 === 0 does not return true") do + assert_raise_with_message(NoMatchingPatternError, "{a: 0}: 1 === 0 does not return true") do {a: 0} => {a: 1} end - assert_raise_with_message(NoMatchingPatternError, "{:a=>0}: {:a=>0} is not empty") do + assert_raise_with_message(NoMatchingPatternError, "{a: 0}: {a: 0} is not empty") do {a: 0} => {} end - assert_raise_with_message(NoMatchingPatternError, "[{:a=>0}]: rest of {:a=>0} is not empty") do + assert_raise_with_message(NoMatchingPatternError, "[{a: 0}]: rest of {a: 0} is not empty") do [{a: 0}] => [{**nil}] end end |