Feature #7609
closed
Moving to Feature requests.
Just curious about use case?
Also, can be hacked in Ruby already...
class Class
def singleton_class?
Class.new(self) && true rescue false
end
end
- Tracker changed from Bug to Feature
- Assignee set to nobu (Nobuyoshi Nakada)
- Target version set to 2.6
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r42449.
Nobuyoshi, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
object.c: Module#singleton_class?
- object.c (rb_mod_singleton_p): new method Module#singleton_class? to
return whether the receiver is a singleton class or not.
[ruby-core:51087] [Feature #7609]
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0