Forum: Ruby-core [ruby-trunk - Bug #7609][Open] Class#singleton_class?

Posted by Nobuyoshi Nakada (nobu)
on 2012-12-23 09:48
(Received via mailing list)
Issue #7609 has been reported by nobu (Nobuyoshi Nakada).

----------------------------------------
Bug #7609: Class#singleton_class?
https://bugs.ruby-lang.org/issues/7609

Author: nobu (Nobuyoshi Nakada)
Status: Open
Priority: Normal
Assignee:
Category: core
Target version:
ruby -v: r38573


Related to #7554, there is no way to tell the called method is a 
singleton method or an ordinary method.
Posted by marcandre (Marc-Andre Lafortune) (Guest)
on 2012-12-23 20:32
(Received via mailing list)
Issue #7609 has been updated by marcandre (Marc-Andre Lafortune).


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



----------------------------------------
Bug #7609: Class#singleton_class?
https://bugs.ruby-lang.org/issues/7609#change-35036

Author: nobu (Nobuyoshi Nakada)
Status: Open
Priority: Normal
Assignee:
Category: core
Target version:
ruby -v: r38573


Related to #7554, there is no way to tell the called method is a 
singleton method or an ordinary method.
Posted by matz (Yukihiro Matsumoto) (Guest)
on 2012-12-24 01:49
(Received via mailing list)
Issue #7609 has been updated by matz (Yukihiro Matsumoto).

Assignee set to nobu (Nobuyoshi Nakada)
Target version set to next minor

OK.

----------------------------------------
Feature #7609: Class#singleton_class?
https://bugs.ruby-lang.org/issues/7609#change-35041

Author: nobu (Nobuyoshi Nakada)
Status: Open
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: core
Target version: next minor


Related to #7554, there is no way to tell the called method is a 
singleton method or an ordinary method.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.