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

assert regexp equality by content not pointer #1559

Merged
merged 1 commit into from Feb 14, 2012

Conversation

ryoqun
Copy link
Member

@ryoqun ryoqun commented Feb 14, 2012

Currently, Regexp::initialize copies a pattern String object to support encoding in 1.9 mode. Yet, some tests in vm:test wrongly assert that the patten obtained from Regexp::source is equal to the passed pattern pointer-wise.

For 1.8 mode, this assertion is fine, because a pattern is passed by reference (pointer). For 1.9 mode, this isn't, because it is passed by value (by means of String::string_dup).

In this commit, I changed to always assert by content not by pointer to correctly test regardless of 1.8 or 1.9.

dbussink added a commit that referenced this pull request Feb 14, 2012
assert regexp equality by content not pointer
@dbussink dbussink merged commit 59727c2 into rubinius:master Feb 14, 2012
@ryoqun
Copy link
Member Author

ryoqun commented Feb 28, 2012

Thank you for merging my commit!

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.

None yet

2 participants