diff options
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/blank.rb | 14 | ||||
-rw-r--r-- | activesupport/lib/active_support/core_ext/enumerable.rb | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/ordered_options.rb | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/activesupport/lib/active_support/core_ext/blank.rb b/activesupport/lib/active_support/core_ext/blank.rb index f56799bc0d..113a8645f9 100644 --- a/activesupport/lib/active_support/core_ext/blank.rb +++ b/activesupport/lib/active_support/core_ext/blank.rb @@ -1,36 +1,36 @@ # The methods here are provided to speed up function blank? in class Object -class NilClass +class NilClass #:nodoc: def blank? true end end -class FalseClass +class FalseClass #:nodoc: def blank? true end end -class TrueClass +class TrueClass #:nodoc: def blank? false end end -class Array +class Array #:nodoc: alias_method :blank?, :empty? end -class Hash +class Hash #:nodoc: alias_method :blank?, :empty? end -class String +class String #:nodoc: def blank? empty? || strip.empty? end end -class Numeric +class Numeric #:nodoc: alias_method :blank?, :zero? end
\ No newline at end of file diff --git a/activesupport/lib/active_support/core_ext/enumerable.rb b/activesupport/lib/active_support/core_ext/enumerable.rb index 497ca52c2d..49e1b7bb90 100644 --- a/activesupport/lib/active_support/core_ext/enumerable.rb +++ b/activesupport/lib/active_support/core_ext/enumerable.rb @@ -1,4 +1,4 @@ -module Enumerable +module Enumerable #:nodoc: def first_match match = nil each do |items| diff --git a/activesupport/lib/active_support/ordered_options.rb b/activesupport/lib/active_support/ordered_options.rb index 5cd7fdadd7..ed5d4d3167 100644 --- a/activesupport/lib/active_support/ordered_options.rb +++ b/activesupport/lib/active_support/ordered_options.rb @@ -1,4 +1,4 @@ -class OrderedOptions < Array +class OrderedOptions < Array #:nodoc: def []=(key, value) key = key.to_sym |