From 362acba04edd8154f6898f5c7e8c7c1e4546b20c Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Tue, 6 Jan 2015 17:17:12 -0200 Subject: 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 --- activesupport/lib/active_support/core_ext/date_and_time/calculations.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib') 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. -- cgit v1.2.3