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 a method redefinition warning #388

Merged
merged 1 commit into from
Mar 1, 2024
Merged

Conversation

Earlopain
Copy link
Contributor

$ bundle exec rspec -w
/home/user/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/ffi-1.16.3/lib/ffi/function.rb:65: warning: method redefined; discarding old vips_object_print_all
/home/user/rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/ffi-1.16.3/lib/ffi/function.rb:65: warning: method redefined; discarding old vips_object_print_all
.....................................................................................................................

Finished in 0.46228 seconds (files took 0.1336 seconds to load)
117 examples, 0 failures

This warning also appears when running tests in projects that make use of ruby-vips.

Simply remove the first definition. Note: attach_function does not respect visibility modifiers. The methods in the private section are in fact public. So there is no behaviour change here.

@jcupitt
Copy link
Member

jcupitt commented Mar 1, 2024

🤦 thanks for spotting this!

@jcupitt jcupitt merged commit 866f509 into libvips:master Mar 1, 2024
24 checks passed
@Earlopain Earlopain deleted the fix-warning branch March 1, 2024 16:16
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