diff options
author | ktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-08 08:54:23 +0000 |
---|---|---|
committer | ktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-08 08:54:23 +0000 |
commit | 40468b5bf1dc9dded05a8769d168bcdf87372866 (patch) | |
tree | 988a50aad801b2ada3af83d078ed6a86cd47c1e5 /object.c | |
parent | dd8710d243f756ea446ae6f92f72c9e41755fd77 (diff) | |
download | ruby-40468b5bf1dc9dded05a8769d168bcdf87372866.tar.gz |
* object.c: [DOC] document Module#singleton_class?.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -2459,6 +2459,19 @@ rb_mod_cvar_defined(VALUE obj, VALUE iv) return rb_cvar_defined(obj, id); } +/* + * call-seq: + * mod.singleton_class? -> true or false + * + * Returns <code>true</code> if <i>mod</i> is a singleton class or + * <code>false</code> if it is an ordinary class or module. + * + * class C + * end + * C.singleton_class? #=> false + * C.singleton_class.singleton_class? #=> true + */ + static VALUE rb_mod_singleton_p(VALUE klass) { |