Skip to content

Commit

Permalink
Accept colon style Hash#inspect in test/console/print_test.rb
Browse files Browse the repository at this point in the history
Accepts {key=>value} style and {key: value} style Hash#inspect
proposed in https://bugs.ruby-lang.org/issues/20433#note-10
  • Loading branch information
tompng authored and ko1 committed Jul 25, 2024
1 parent 8abc50a commit 79cdcfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/console/print_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 79cdcfa

Please sign in to comment.