mirror of
https://github.com/github/rails.git
synced 2026-04-04 03:00:58 -04:00
TimeWithZone: use Array#any? instead of detect, since we don't care about the block return value
This commit is contained in:
@@ -328,7 +328,7 @@ module ActiveSupport
|
||||
end
|
||||
|
||||
def duration_of_variable_length?(obj)
|
||||
ActiveSupport::Duration === obj && obj.parts.flatten.detect {|p| [:years, :months, :days].include? p }
|
||||
ActiveSupport::Duration === obj && obj.parts.flatten.any? {|p| [:years, :months, :days].include? p }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user