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

Fix "method redefined" Ruby warning in verbose mode #30

Merged
merged 1 commit into from Aug 16, 2021

Conversation

semaperepelitsa
Copy link
Contributor

We usually filter out verbose warnings coming from external gems, but this one slipped through because it is originated from a C extension, that's how I noticed it.

Anyway, the fix is very simple. I have also enabled the verbose mode in your specs by default so that warnings are easy to spot - the same thing is done in Rails gems.

Before/After:

> rake spec
/Users/sema/.rubies/ruby-2.7.1/bin/ruby -I/Users/sema/.gem/ruby/2.7.0/gems/rspec-core-3.10.1/lib:/Users/sema/.gem/ruby/2.7.0/gems/rspec-support-3.10.2/lib /Users/sema/.gem/ruby/2.7.0/gems/rspec-core-3.10.1/exe/rspec --pattern spec/\*\*/\*_spec.rb
/Users/sema/Code/Clones/fast_blank/lib/fast_blank.bundle: warning: method redefined; discarding old blank?
/Users/sema/Code/Clones/fast_blank/spec/fast_blank_spec.rb:5: warning: previous definition of blank? was here
....

Finished in 0.16338 seconds (files took 0.08029 seconds to load)
4 examples, 0 failures
> rake spec
/Users/sema/.rubies/ruby-2.7.1/bin/ruby -I/Users/sema/.gem/ruby/2.7.0/gems/rspec-core-3.10.1/lib:/Users/sema/.gem/ruby/2.7.0/gems/rspec-support-3.10.2/lib /Users/sema/.gem/ruby/2.7.0/gems/rspec-core-3.10.1/exe/rspec --pattern spec/\*\*/\*_spec.rb
....

Finished in 0.16046 seconds (files took 0.07741 seconds to load)
4 examples, 0 failures

@SamSaffron
Copy link
Owner

nice fix, will push out a new release now

@SamSaffron SamSaffron merged commit edeb185 into SamSaffron:master Aug 16, 2021
@semaperepelitsa semaperepelitsa deleted the method-redefined branch August 16, 2021 23:40
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