From 79cdcfa5bf693b655b1230773ac6fdda5fbf53ed Mon Sep 17 00:00:00 2001 From: tompng Date: Thu, 25 Jul 2024 02:02:55 +0900 Subject: [PATCH] Accept colon style Hash#inspect in test/console/print_test.rb Accepts {key=>value} style and {key: value} style Hash#inspect proposed in https://bugs.ruby-lang.org/issues/20433#note-10 --- test/console/print_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/console/print_test.rb b/test/console/print_test.rb index 3f9702b76..16f5c4436 100644 --- a/test/console/print_test.rb +++ b/test/console/print_test.rb @@ -15,7 +15,7 @@ def test_p_prints_the_expression debug_code(program) do type "c" type "p h" - assert_line_text('{:foo=>"bar"}') + assert_line_text({ foo: "bar" }.inspect) type "c" end end @@ -24,7 +24,7 @@ def test_pp_pretty_prints_the_expression debug_code(program) do type "c" type "pp h" - assert_line_text([/\{:foo=>/, /"bar"\}/]) + assert_line_text({ foo: "bar" }.pretty_print_inspect) type "c" end end