From ecd08a527e810d49f1cee040e935bb5b74604dc6 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 6 Oct 2024 00:45:46 +0900 Subject: [PATCH] Hash#inspect style has changed in ruby 3.4 [[Bug #20433]](https://bugs.ruby-lang.org/issues/20433) --- test/irb/test_helper_method.rb | 3 ++- test/irb/test_irb.rb | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/irb/test_helper_method.rb b/test/irb/test_helper_method.rb index 291278c16..a3e2c43b2 100644 --- a/test/irb/test_helper_method.rb +++ b/test/irb/test_helper_method.rb @@ -76,7 +76,8 @@ def execute( type "exit" end - assert_include(output, '["required", "optional", ["splat"], "required", "optional", {:a=>1, :b=>2}, "block"]') + optional = {a: 1, b: 2} + assert_include(output, %[["required", "optional", ["splat"], "required", "optional", #{optional.inspect}, "block"]]) end def test_helper_method_injection_can_happen_after_irb_require diff --git a/test/irb/test_irb.rb b/test/irb/test_irb.rb index 2913f3d48..617e9c961 100644 --- a/test/irb/test_irb.rb +++ b/test/irb/test_irb.rb @@ -155,8 +155,8 @@ def test_current_context_restore type 'exit' end - assert_include output, '{:context_changed=>true}' - assert_include output, '{:context_restored=>true}' + assert_include output, {context_changed: true}.inspect + assert_include output, {context_restored: true}.inspect end end