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

Fixed the broken ruby-head NoMethodError spec. #2193

Merged
merged 2 commits into from
Oct 4, 2021

Conversation

Jack12816
Copy link
Contributor

- What is it good for

Fix the broken ruby-head continuous integration build (latest master).

- What I did

Looks like ruby 3.1.0-dev adds a more verbose exception message with the raising line as a suffix.

# Before 3.1.0-dev
pp e.message
"undefined method `not_exist_method'"

# After/With 3.1.0-dev
pp e.message
"undefined method `not_exist_method'\n" +
"\n" +
"          raise NoMethodError, \"undefined method `\#{handler}'\" unless respond_to?(handler)\n" +
"          ^^^^^"

So I just converted the raise_error message from a string to a regexp to ignore the new suffix.

- A picture of a cute animal (not mandatory but encouraged)

images (1)

@Jack12816 Jack12816 marked this pull request as ready for review October 4, 2021 15:23
@grape-bot
Copy link

grape-bot commented Oct 4, 2021

1 Message
📖 We really appreciate pull requests that demonstrate issues, even without a fix. That said, the next step is to try and fix the failing tests!

Generated by 🚫 Danger

Signed-off-by: Hermann Mayer <hermann.mayer92@gmail.com>
@dblock dblock merged commit 43936ac into ruby-grape:master Oct 4, 2021
@dblock
Copy link
Member

dblock commented Oct 4, 2021

🚀

@Jack12816
Copy link
Contributor Author

@dblock could you add the hacktoberfest-accepted label? 🙃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants