mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
AS guide: updates definition file for singleton_class and class_eval
This commit is contained in:
@@ -212,7 +212,7 @@ String.new.singleton_class # => #<Class:#<String:0x17a1d1c>>
|
||||
WARNING: Fixnums and symbols have no singleton classes, +singleton_class+
|
||||
raises +TypeError+ on them. Moreover, the singleton classes of +nil+, +true+, and +false+, are +NilClass+, +TrueClass+, and +FalseClass+, respectively.
|
||||
|
||||
NOTE: Defined in +active_support/core_ext/object/singleton_class.rb+.
|
||||
NOTE: Defined in +active_support/core_ext/kernel/singleton_class.rb+.
|
||||
|
||||
h4. +class_eval(*args, &block)+
|
||||
|
||||
@@ -233,7 +233,7 @@ class Proc
|
||||
end
|
||||
</ruby>
|
||||
|
||||
NOTE: Defined in +active_support/core_ext/object/singleton_class.rb+.
|
||||
NOTE: Defined in +active_support/core_ext/kernel/singleton_class.rb+.
|
||||
|
||||
h4. +acts_like?(duck)+
|
||||
|
||||
|
||||
Reference in New Issue
Block a user