diff options
author | Xavier Noria <fxn@hashref.com> | 2010-03-28 04:08:54 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-03-28 04:08:54 +0200 |
commit | 4b4f69b9bfbd33556e23262f57cf6d944dfd9f63 (patch) | |
tree | 8d90f8d7d4b61fb7ff09e174fc34f141259dc243 /railties | |
parent | 93d80672f421de29a726adc0c5ea431dd52e9923 (diff) | |
download | rails-4b4f69b9bfbd33556e23262f57cf6d944dfd9f63.tar.gz rails-4b4f69b9bfbd33556e23262f57cf6d944dfd9f63.tar.bz2 rails-4b4f69b9bfbd33556e23262f57cf6d944dfd9f63.zip |
AS guide: warns about the singleton classes of nil, true, and false according to what http://redmine.ruby-lang.org/repositories/diff/ruby-19/object.c?rev=27022 blesses
Diffstat (limited to 'railties')
-rw-r--r-- | railties/guides/source/active_support_core_extensions.textile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile index 0a9374e028..a8410a8dd2 100644 --- a/railties/guides/source/active_support_core_extensions.textile +++ b/railties/guides/source/active_support_core_extensions.textile @@ -210,7 +210,7 @@ String.new.singleton_class # => #<Class:#<String:0x17a1d1c>> </ruby> WARNING: Fixnums and symbols have no singleton classes, +singleton_class+ -raises +TypeError+ on them. +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+. |