Skip to content

Commit

Permalink
Hash#inspect style has changed in ruby 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Oct 5, 2024
1 parent 68f718d commit ecd08a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion test/irb/test_helper_method.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/irb/test_irb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ecd08a5

Please sign in to comment.