Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: JRuby 0.9.0
-
Fix Version/s: JRuby 0.9.2
-
Component/s: Interpreter
-
Labels:None
-
Environment:JRuby 0.9.0 on Windows through jsr-223 engine
and
Ruby version ruby 1.8.4 (2006-04-14) [i386-mswin32]
-
Number of attachments :
Description
Ruby the native implementation seems to hide all singleton classes in ancestor() call. But, JRuby 0.9.0 returns singleton classes.
- The output of the following
- script is different from that of
- Ruby 1.8.4
class Object
def singleton
class<<self; self; end
end
end
class Person
end
class Employee < Person
end
puts Employee.singleton.ancestors().join("\n")
Output with JRuby 0.9.0 is as follows:
#<Class:Employee>
#<Class:Person>
#<Class:Object>
Class
Module
Object
Kernel
Output with Ruby 1.8.4 is as follows:
Class
Module
Object
Kernel