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

A few cleanups following removal of support for Ruby v1.8 #542

Closed
wants to merge 3 commits into from

Conversation

nitishr
Copy link
Contributor

@nitishr nitishr commented Aug 28, 2022

... in #536

Copy link
Member

@floehopper floehopper left a comment

Choose a reason for hiding this comment

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

Hi @nitishr. Many thanks for submitting this. The first commit looks good to me, but I'm a bit less sure about the 2nd one. I've added some questions inline.

lib/mocha/mockery.rb Show resolved Hide resolved
test/assertions.rb Outdated Show resolved Hide resolved
lib/mocha/stubbed_method.rb Outdated Show resolved Hide resolved
 Since at least ruby 1.8.7 (the lowest version I checked with),
 - Object#respond_to? accepts either string or symbol interchangeably (since at
   least ruby 1.8.7)
 - __method_exists__? (from Mocha::ClassMethod) accepts either string or symbol
   since the methods it passes the arg to
   ({public,protected,private}_method_defined?) treat them interchangeably
Copy link
Member

@floehopper floehopper left a comment

Choose a reason for hiding this comment

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

I belatedly realised that it is safe to remove the call to to_sym from Assertions#assert_method_visibility, so I've changed the last commit to do that. Since strictly speaking not all these changes were enabled by the dropping of support for Ruby v1.8, I've merged these commit manually rather than grouping them into a merge commit.

@floehopper
Copy link
Member

Merged manually. Closing.

@floehopper floehopper closed this Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants