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:
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?