1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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
This commit is contained in:
Carlos Antonio da Silva 2015-01-06 17:17:12 -02:00
parent f542ffeffc
commit 362acba04e

View file

@ -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.