aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2015-01-06 17:17:12 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2015-01-06 17:17:15 -0200
commit362acba04edd8154f6898f5c7e8c7c1e4546b20c (patch)
tree63c4b1d7519d1592eb51fa11ddf5fc4d1a6b6fda /activesupport
parentf542ffeffc2c9910176c32450aeabbdb7959d124 (diff)
downloadrails-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
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/date_and_time/calculations.rb2
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.