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

silence "warning: method redefined; discarding old attribute" #311

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

krisleech
Copy link
Contributor

virtus/lib/virtus/builder.rb:73: warning: method redefined; discarding old attribute
virtus/lib/virtus/builder/hook_context.rb:43: warning: previous definition of attribute was here

This PR silences the above warning by first undefining the method before defining a new one.

I do not know if this is a good tactic. I assume the defined singleton method can not call super anyway, otherwise there would be no warning.

@solnic
Copy link
Owner

solnic commented Feb 16, 2015

Thanks, when does this happen?

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.

2 participants