diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2015-01-06 17:17:12 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2015-01-06 17:17:15 -0200 |
commit | 362acba04edd8154f6898f5c7e8c7c1e4546b20c (patch) | |
tree | 63c4b1d7519d1592eb51fa11ddf5fc4d1a6b6fda | |
parent | f542ffeffc2c9910176c32450aeabbdb7959d124 (diff) | |
download | rails-362acba04edd8154f6898f5c7e8c7c1e4546b20c.tar.gz rails-362acba04edd8154f6898f5c7e8c7c1e4546b20c.tar.bz2 rails-362acba04edd8154f6898f5c7e8c7c1e4546b20c.zip |
Use Ruby's #include? to avoid relying on AS extension
The build has failed when running the date/time ext tests in isolation
due to the missing extension, so better than adding a require is using
just Ruby in this case.
https://travis-ci.org/rails/rails/jobs/46107954#L1077
-rw-r--r-- | activesupport/lib/active_support/core_ext/date_and_time/calculations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb b/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb index e4bfd9f7c5..9525c10112 100644 --- a/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb +++ b/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb @@ -48,7 +48,7 @@ module DateAndTime # Returns true if the date/time falls on a Saturday or Sunday. def on_weekend? - wday.in?(WEEKEND_DAYS) + WEEKEND_DAYS.include?(wday) end # Returns a new date/time the specified number of days ago. |