aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/time_with_zone.rb
diff options
context:
space:
mode:
authorGeoff Buesing <gbuesing@gmail.com>2009-02-08 23:32:54 -0600
committerGeoff Buesing <gbuesing@gmail.com>2009-02-08 23:32:54 -0600
commit887434f75fc0a207ac7184debcd3074802758952 (patch)
treef11dadef6b058ffb4fc9307be981d9acef62e011 /activesupport/lib/active_support/time_with_zone.rb
parent5394fcb19a0ee5ecb2f34543027260fc4eb931da (diff)
downloadrails-887434f75fc0a207ac7184debcd3074802758952.tar.gz
rails-887434f75fc0a207ac7184debcd3074802758952.tar.bz2
rails-887434f75fc0a207ac7184debcd3074802758952.zip
TimeWithZone: eliminate unnecessary flatten
Diffstat (limited to 'activesupport/lib/active_support/time_with_zone.rb')
-rw-r--r--activesupport/lib/active_support/time_with_zone.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb
index 4adf123ab2..5b70df3017 100644
--- a/activesupport/lib/active_support/time_with_zone.rb
+++ b/activesupport/lib/active_support/time_with_zone.rb
@@ -328,7 +328,7 @@ module ActiveSupport
end
def duration_of_variable_length?(obj)
- ActiveSupport::Duration === obj && obj.parts.flatten.any? {|p| [:years, :months, :days].include? p }
+ ActiveSupport::Duration === obj && obj.parts.any? {|p| [:years, :months, :days].include? p[0] }
end
end
end