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:
parent
5394fcb19a
commit
887434f75f
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue