Skip to content

Commit a6da8d6

Browse files
nobumatzbot
authored andcommitted
[ruby/irb] Hash#inspect style has changed in ruby 3.4
[[Bug #20433]](https://bugs.ruby-lang.org/issues/20433) ruby/irb@ecd08a527e
1 parent d17edf3 commit a6da8d6

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

test/irb/test_helper_method.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ def execute(
7676
type "exit"
7777
end
7878

79-
assert_include(output, '["required", "optional", ["splat"], "required", "optional", {:a=>1, :b=>2}, "block"]')
79+
optional = {a: 1, b: 2}
80+
assert_include(output, %[["required", "optional", ["splat"], "required", "optional", #{optional.inspect}, "block"]])
8081
end
8182

8283
def test_helper_method_injection_can_happen_after_irb_require

test/irb/test_irb.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ def test_current_context_restore
155155
type 'exit'
156156
end
157157

158-
assert_include output, '{:context_changed=>true}'
159-
assert_include output, '{:context_restored=>true}'
158+
assert_include output, {context_changed: true}.inspect
159+
assert_include output, {context_restored: true}.inspect
160160
end
161161
end
162162

0 commit comments

Comments
 (0)