diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-07-27 15:29:46 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-07-27 15:29:46 -0700 |
commit | 6b7424c23015a93d981b054c525850b71e98f322 (patch) | |
tree | e4a64a6338462c09204cd935ca092ffbf3d35711 /activesupport | |
parent | bffda1e65e41c77c6c7fc8053feee6dddd0900ef (diff) | |
parent | 7ed8934f089dba8cbb90a98920cd4242ba5e0fd3 (diff) | |
download | rails-6b7424c23015a93d981b054c525850b71e98f322.tar.gz rails-6b7424c23015a93d981b054c525850b71e98f322.tar.bz2 rails-6b7424c23015a93d981b054c525850b71e98f322.zip |
Merge pull request #11625 from phstc/minor-refactor-code-gardener-grouping
Minor refactor - Uses Enumerable#to_a instead of iterate and add to an array
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/date/calculations.rb | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/core_ext/hash/conversions.rb | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/date/calculations.rb b/activesupport/lib/active_support/core_ext/date/calculations.rb index 06e4847e82..eddb1b851f 100644 --- a/activesupport/lib/active_support/core_ext/date/calculations.rb +++ b/activesupport/lib/active_support/core_ext/date/calculations.rb @@ -119,7 +119,7 @@ class Date options.fetch(:day, day) ) end - + # Allow Date to be compared with Time by converting to DateTime and relying on the <=> from there. def compare_with_coercion(other) if other.is_a?(Time) diff --git a/activesupport/lib/active_support/core_ext/hash/conversions.rb b/activesupport/lib/active_support/core_ext/hash/conversions.rb index 8930376ac8..fbf2877117 100644 --- a/activesupport/lib/active_support/core_ext/hash/conversions.rb +++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb @@ -235,7 +235,6 @@ module ActiveSupport value.map! { |i| deep_to_h(i) } value.length > 1 ? value : value.first end - end end |