Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

keys.include? -> key?

  • Loading branch information...
commit 2e0c6173bdac9e37131ea1ab621f51e554bde699 1 parent 2296e74
@fxn fxn authored
View
2  activesupport/lib/active_support/core_ext/date/calculations.rb
@@ -28,7 +28,7 @@ def beginning_of_week=(week_start)
# Returns week start day symbol (e.g. :monday), or raises an ArgumentError for invalid day symbol.
def find_beginning_of_week!(week_start)
- raise ArgumentError, "Invalid beginning of week: #{week_start}" unless ::Date::DAYS_INTO_WEEK.keys.include?(week_start)
+ raise ArgumentError, "Invalid beginning of week: #{week_start}" unless ::Date::DAYS_INTO_WEEK.key?(week_start)
week_start
end
Please sign in to comment.
Something went wrong with that request. Please try again.