Skip to content

Accept colon-style hash in test assertion - #732

Merged
tompng merged 1 commit into
ruby:masterfrom
tompng:hash_style_test_fix
Aug 5, 2024
Merged

tompng merged 1 commit into
ruby:masterfrom
tompng:hash_style_test_fix

Conversation

@tompng

@tompng tompng commented Jul 24, 2024

Copy link
Copy Markdown
Member

Hash#inspect is proposed to change to {key: value, non_symbol_key => value} in https://bugs.ruby-lang.org/issues/20433#note-10

This pull request will make test pass in both current hash inspect style and the proposed hash inspect style.

- assert_include(actual, "{:key=>value}")
+ assert_include(actual, { key: value }.inspect)

Patch that change Hash#inspect is here ruby/ruby#10924
rake test passes with colon style inspect patch, but rake test_rendering fails (2 failure).
This does not affect ruby core ci, so I'd like to fix it after Hash#inspect is changed in ruby head.

Hash#inspect is proposed to change to {key: value, non_symbol_key => value} in https://bugs.ruby-lang.org/issues/20433#note-10
@tompng
tompng merged commit 1fd73b3 into ruby:master Aug 5, 2024
@tompng
tompng deleted the hash_style_test_fix branch August 5, 2024 15:53
matzbot pushed a commit to ruby/ruby that referenced this pull request Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants