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

1.7.x define_singleton_method fails in fascinating ways in odd situations #3582

Closed
andrewvc opened this issue Jan 6, 2016 · 1 comment
Closed

Comments

@andrewvc
Copy link

andrewvc commented Jan 6, 2016

This change ( elastic/logstash@a0819e2 ) in Logstash is a workaround for a bizarre JRuby 1.7.x bug. This bug is not present in JRuby 9.x.

The synopsis is that sometimes define_singleton_method(:mymethod, method(:mymethodalt)) fails where define_singleton_method(:mymethod, lambda { mymethodalt }) does not.

For reasons that are not clear, when running the specs for https://github.com/logstash-plugins/logstash-output-file against logstash in the preceding commit preceding elastic/logstash@a0819e2 a TypeError: can't bind singleton method to a different class exception would be raised.

The funky thing is that not only was this not a subclass of OutputDelegator, but there are no subclasses defined anywhere for it. Weird stuff!

@kares
Copy link
Member

kares commented Jun 23, 2017

since 1.7.x is EOL and logstash is updating to 9K I think this can be closed. esp. since there's a work-around.

@kares kares closed this as completed Jun 23, 2017
@kares kares added this to the Won't Fix milestone Jun 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants