aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/object/blank.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2012-04-28 20:18:26 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2012-04-28 20:18:26 -0700
commit1a4e27ff96b3b7add1a4a43ca757ea8ee6c05c00 (patch)
tree03e64efa0e3a307c0f8f58eadc31fc01e26b1cd7 /activesupport/lib/active_support/core_ext/object/blank.rb
parentad2c5ea2786817592014fae09934398173c1a7f9 (diff)
parent432a65fab2a6c7eb6ff77062e73f7627470f7da7 (diff)
downloadrails-1a4e27ff96b3b7add1a4a43ca757ea8ee6c05c00.tar.gz
rails-1a4e27ff96b3b7add1a4a43ca757ea8ee6c05c00.tar.bz2
rails-1a4e27ff96b3b7add1a4a43ca757ea8ee6c05c00.zip
Merge pull request #5996 from gazay/remove_excess_selfs
Active Support housekeeping and polish
Diffstat (limited to 'activesupport/lib/active_support/core_ext/object/blank.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/object/blank.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/blank.rb b/activesupport/lib/active_support/core_ext/object/blank.rb
index d67711f3b8..e238fef5a2 100644
--- a/activesupport/lib/active_support/core_ext/object/blank.rb
+++ b/activesupport/lib/active_support/core_ext/object/blank.rb
@@ -2,7 +2,7 @@
class Object
# An object is blank if it's false, empty, or a whitespace string.
- # For example, "", " ", +nil+, [], and {} are all blank.
+ # For example, '', ' ', +nil+, [], and {} are all blank.
#
# This simplifies:
#
@@ -90,10 +90,10 @@ end
class String
# A string is blank if it's empty or contains whitespaces only:
#
- # "".blank? # => true
- # " ".blank? # => true
- # " ".blank? # => true
- # " something here ".blank? # => false
+ # ''.blank? # => true
+ # ' '.blank? # => true
+ # ' '.blank? # => true
+ # ' something here '.blank? # => false
#
def blank?
self !~ /[^[:space:]]/