You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I create a module and extend it in an object, creating singleton_methods, I should be able to hide one of the object's singleton methods by making it private. This works in MRI Ruby 1.8.7, Ruby 1.9.1, and many of the derivatives (I've also tried it in MacRuby 0.8, and REE 1.8.7).
moduleXmoddefamethodendend#create an object with singleton methods by extending Xmodx=Object.newx.extendXmodpx.singleton_methods# ["amethod"] # we're all good here#change the singleton method to privateclass << xprivate:amethodend#shouldn't see private method any more, but JRuby still shows itpx.singleton_methods# MRI => [], JRuby 1.5.6 => ["amethod"]
Note, I tried to simplify the test by just trying:
If it is ok with you I would prefer to keep this open, since it documents an unfixed issue.
Perhaps you can remember whether this affect application code? Like, did it break something you needed, or did you just happen to notice the behavior was incorrect?
IIRC, I raised this issue during the migration from codehaus to github. At the time I was trying to contribute to the project and in my case, it was testing old issues to see if they had already been fixed. I didn't personally experience this issue.
My problem with keeping this issue open is that it shows up in my personal list of issues as a TODO for me. I haven't used JRuby since 2016 and since this hasn't been fixed in 6 years, it doesn't seem like a priority.
Would it be possible to create a new issue under your name and reference this one?
From: http://jira.codehaus.org/browse/JRUBY-5439. Not working on JRuby 1.7.18 and JRuby 9000.
If I create a module and extend it in an object, creating singleton_methods, I should be able to hide one of the object's singleton methods by making it private. This works in MRI Ruby 1.8.7, Ruby 1.9.1, and many of the derivatives (I've also tried it in MacRuby 0.8, and REE 1.8.7).
Note, I tried to simplify the test by just trying:
But this test case works. The bug only shows up with a singleton method created by an extend.
The text was updated successfully, but these errors were encountered: