1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

TimeWithZone: eliminate unnecessary flatten

This commit is contained in:
Geoff Buesing 2009-02-08 23:32:54 -06:00
parent 5394fcb19a
commit 887434f75f

View file

@ -328,7 +328,7 @@ module ActiveSupport
end end
def duration_of_variable_length?(obj) 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 end
end end