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

Avoid calling Kernel#format from ObjectMethods#mocha_inspect #345

Conversation

floehopper
Copy link
Member

Slightly tweaked version of #343.

Previously setting an expectation on an instance of a class that defined a custom format method resulted in incorrect information being displayed or an ArgumentError if the arity of the format method was different from Kernel#format. By calling Kernel.format directly we can avoid this problem.

Fixes #342.

Previously setting an expectation on an instance of a class that defined
a custom `format` method resulted in incorrect information being
displayed or an ArgumentError if the arity of the `format` method was
different from `Kernel#format`. By calling `Kernel.format` directly we
can avoid this problem.

Fixes #342.
@floehopper floehopper merged commit 7306d03 into master Oct 7, 2018
@floehopper floehopper deleted the avoid-calling-kernel-format-from-object-methods-mocha-inspect branch October 7, 2018 12:02
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