Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add spec for compare_by_identity behaviour of Hash#replace #1160

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

herwinw
Copy link
Member

@herwinw herwinw commented Jun 16, 2024

The spec has originally been written by @seven1m in natalie-lang/natalie#2104

This change does include a cleanup of the specs of Hash#replace: it used a shared spec, but this was the only user of this spec. This shared spec has been moved inline into the main file.

This one was used in just one location, moving the specs inline.
@@ -1,51 +0,0 @@
describe :hash_replace, shared: true do
it "replaces the contents of self with other" do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, makes sense. This shared example was used also for Hash#initialize_copy but in d3f83d1 specs for Hash#initialize_copy were removed.

@andrykonchin
Copy link
Member

Thank you!

@andrykonchin andrykonchin merged commit d0f1c98 into ruby:master Jun 17, 2024
14 checks passed
@herwinw herwinw deleted the hash_replace branch June 17, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants