Skip to content

Commit 79cdcfa

Browse files
tompngko1
authored andcommitted
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
1 parent 8abc50a commit 79cdcfa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/console/print_test.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def test_p_prints_the_expression
1515
debug_code(program) do
1616
type "c"
1717
type "p h"
18-
assert_line_text('{:foo=>"bar"}')
18+
assert_line_text({ foo: "bar" }.inspect)
1919
type "c"
2020
end
2121
end
@@ -24,7 +24,7 @@ def test_pp_pretty_prints_the_expression
2424
debug_code(program) do
2525
type "c"
2626
type "pp h"
27-
assert_line_text([/\{:foo=>/, /"bar"\}/])
27+
assert_line_text({ foo: "bar" }.pretty_print_inspect)
2828
type "c"
2929
end
3030
end

0 commit comments

Comments
 (0)