Skip to content

Commit

Permalink
add Object#singleton_class
Browse files Browse the repository at this point in the history
  • Loading branch information
znz committed Mar 24, 2010
1 parent 834a1d8 commit 33ca251
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions refm/api/src/_builtin/Object
Expand Up @@ -1845,3 +1845,21 @@ undef
@see [[m:Module#class_exec]], [[m:Module#module_exec]], [[m:Object#instance_eval]]

#@end
#@since 1.9.2
--- singleton_class -> Class
#@todo

�쥷���Ф��ðۥ��饹���֤��ޤ���
�ޤ��ðۥ��饹���ʤ���С��������������ޤ���

�쥷���Ф� nil �� true �� false �ʤ顢���줾�� NilClass, TrueClass,
FalseClass ���֤��ޤ���

@raise TypeError �쥷���Ф� Fixnum �� Symbol �ξ���ȯ�����ޤ���

Object.new.singleton_class #=> #<Class:#<Object:0xb7ce1e24>>
String.singleton_class #=> #<Class:String>
nil.singleton_class #=> NilClass

@see [[m:Object#class]]
#@end

0 comments on commit 33ca251

Please sign in to comment.