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

Many warning: method redefined warnings on latest version #117

Open
mariozaizar opened this issue Sep 20, 2024 · 0 comments
Open

Many warning: method redefined warnings on latest version #117

mariozaizar opened this issue Sep 20, 2024 · 0 comments

Comments

@mariozaizar
Copy link
Member

mariozaizar commented Sep 20, 2024

Whats the best approach to avoid these warnings?

/home/runner/runner/agent/_work/..vendor/bundle/ruby/3.2.0/gems/property_sets-3.13.0/lib/property_sets/active_record_extension.rb:62: warning: method redefined; discarding old ssl_enabled?
/home/runner/runner/agent/_work/..vendor/bundle/ruby/3.2.0/gems/property_sets-3.13.0/lib/property_sets/active_record_extension.rb:62: warning: previous definition of ssl_enabled? was here
/home/runner/runner/agent/_work/..vendor/bundle/ruby/3.2.0/gems/property_sets-3.13.0/lib/property_sets/active_record_extension.rb:69: warning: method redefined; discarding old ssl_enabled
/home/runner/runner/agent/_work/..vendor/bundle/ruby/3.2.0/gems/property_sets-3.13.0/lib/property_sets/active_record_extension.rb:69: warning: previous definition of ssl_enabled was here
/home/runner/runner/agent/_work/..vendor/bundle/ruby/3.2.0/gems/property_sets-3.13.0/lib/property_sets/active_record_extension.rb:75: warning: method redefined; discarding old ssl_enabled=
/home/runner/runner/agent/_work/..vendor/bundle/ruby/3.2.0/gems/property_sets-3.13.0/lib/property_sets/active_record_extension.rb:75: warning: previous definition of ssl_enabled= was here
... <many many more>

Looking at some docs, it seems like is not a big deal, but annoying. Can we do something about it?

Method Redefined1
This warning helps us find when a method is overridden. This is not necessarily a bad thing, most of the time this is fine and it’s needed for some gems to be able to do their job. In general, this warning serves an informative purpose and is not necessarily something that needs to be fixed, but can help us find monkey patches, for example.

Footnotes

  1. https://www.fastruby.io/blog/exploring-ruby-warnings.html

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

No branches or pull requests

1 participant