Added edge cases for class Class.

This commit is contained in:
Peter Camilleri 2016-02-07 17:47:41 -05:00
parent edbba27156
commit aef132310b
2 changed files with 3 additions and 2 deletions

Binary file not shown.

View file

@ -10,8 +10,9 @@ module XfOOrth
#Get the class as a string.
# [cls] .to_s ["cls as a string"]
Class.create_shared_method('.to_s', TosSpec, [],
&lambda {|vm| vm.push(self.foorth_name || 'Anonymous Class')})
Class.create_shared_method('.to_s', TosSpec, [], &lambda {|vm|
vm.push(self.foorth_name || "AnonymousClass<#{self.object_id}>")
})
#The .parent_class method. Retrieves the parent class of a class.
# [a_class] .parent_class [parent_class or nil]