-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
Regression in overcommit's tests in JRuby 9000 #3686
Comments
Confirmed still broken. Investigating. |
This appears to be happening against an |
Ok, seemed to have narrowed it down to this code in # works around the fact that repeated calls for method parameters will
# falsely return empty arrays on JRuby in certain circumstances, this
# is necessary here because we can't dup/clone UnboundMethods.
#
# This is necessary due to a bug in JRuby prior to 1.7.5 fixed in:
# https://github.com/jruby/jruby/commit/99a0613fe29935150d76a9a1ee4cf2b4f63f4a27
if RUBY_PLATFORM == 'java' && JRUBY_VERSION.split('.')[-1].to_i < 5
def find_method(mod)
mod.dup.instance_method(@method_name)
end
else
def find_method(mod)
mod.instance_method(@method_name)
end
end This workaround appears to be doing something strange when it comes to your If I remove the workaround and just go with the regular code, your specs pass fine. |
Hah...well based on the conditional here, this hack was intended to run only under JRuby 1.7.4 and lower, but it did so by checking that the last digit of So there's two things to do:
|
Ok, I think this might be the bug:
|
Note that this bug exists in both 1.7 and in 9k...we only see this impact on rspec in 9k because the last digit of |
This could be expanded into a full set of dup/clone specs, or the Class#dup/clone specs could be expanded to also test other types of "weird" classes like structs and prepends. For #3686
Thanks @headius! ❤️ 💛 💜 I added a fix in rspec-mocks! |
@deivid-rodriguez Thank you! |
This could be expanded into a full set of dup/clone specs, or the Class#dup/clone specs could be expanded to also test other types of "weird" classes like structs and prepends. For jruby/jruby#3686
https://github.com/brigade/overcommit
In JRuby 1.7.24
results in
whereas in JRuby 9.0.5.0 results in
Regards!
The text was updated successfully, but these errors were encountered: