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

exchange string and regexp in assert_match tests #900

Merged
merged 1 commit into from May 14, 2013

Conversation

boutil
Copy link
Contributor

@boutil boutil commented May 9, 2013

Hi!

MiniTest gem raises a TypeError
TypeError: can't convert Regexp to String
when in assert_match the first argument is a string and the second a
regular expression, as the first argument is always converted to RegExp.

Note that this does not happen with the version of minitest shipped with ruby1.9.3, and has occured with the gem since the following commit in minitest:
minitest/minitest@46a2bc3

This patch changes the order so that in assert_match, at least one of the operands in =~ is a String.

Cheers,

Cédric

MiniTest gem raises a TypeError
 TypeError: can't convert Regexp to String
when in assert_match the first argument is a string and the second a
regular expression, as the first argument is always converted to RegExp.
leejarvis added a commit that referenced this pull request May 14, 2013
exchange string and regexp in assert_match tests
@leejarvis leejarvis merged commit f157d05 into sparklemotion:master May 14, 2013
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