From 1c5d5ad3e96ec742aee815ed33598822f62b6987 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Wed, 20 Apr 2011 06:28:22 +0900 Subject: NilClass is a singleton --- activesupport/lib/active_support/core_ext/object/try.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/core_ext/object/try.rb b/activesupport/lib/active_support/core_ext/object/try.rb index aedf5c8c82..e77a9da0ec 100644 --- a/activesupport/lib/active_support/core_ext/object/try.rb +++ b/activesupport/lib/active_support/core_ext/object/try.rb @@ -35,7 +35,7 @@ class Object end class NilClass - # Instances of +NilClass+ return always +nil+. + # Calling +try+ on +nil+ always returns +nil+. # It becomes specially helpful when navigating through associations that may return +nil+. # # === Examples -- cgit v1.2.3 From c389b832f0f3aad2bf9550c81a20a8c5e6574423 Mon Sep 17 00:00:00 2001 From: Cheah Chu Yeow Date: Fri, 22 Apr 2011 15:14:14 +0800 Subject: Grammar fixes for Object#in? documentation. --- activesupport/lib/active_support/core_ext/object/inclusion.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/core_ext/object/inclusion.rb b/activesupport/lib/active_support/core_ext/object/inclusion.rb index 51cfc62f2b..b5671f66d0 100644 --- a/activesupport/lib/active_support/core_ext/object/inclusion.rb +++ b/activesupport/lib/active_support/core_ext/object/inclusion.rb @@ -1,11 +1,11 @@ class Object # Returns true if this object is included in the argument. Argument must be - # any object which respond to +#include?+. Usage: + # any object which responds to +#include?+. Usage: # # characters = ["Konata", "Kagami", "Tsukasa"] # "Konata".in?(characters) # => true # - # This will throw an ArgumentError if the supplied argument doesnt not respond + # This will throw an ArgumentError if the argument doesn't respond # to +#include?+. def in?(another_object) another_object.include?(self) -- cgit v1.2.3