From 4f75809f04ddd5cbfb548feab427666711ffee8a Mon Sep 17 00:00:00 2001 From: Vishnu Atrai Date: Sat, 7 Jan 2012 00:19:26 +0530 Subject: revert "fixing some tests on ruby 1.9.3 SHA 33f222b" --- .../core_ext/date_time/calculations.rb | 23 ---------------------- 1 file changed, 23 deletions(-) (limited to 'activesupport/lib/active_support/core_ext/date_time/calculations.rb') diff --git a/activesupport/lib/active_support/core_ext/date_time/calculations.rb b/activesupport/lib/active_support/core_ext/date_time/calculations.rb index 1a3cf66a1b..6dd321ecf9 100644 --- a/activesupport/lib/active_support/core_ext/date_time/calculations.rb +++ b/activesupport/lib/active_support/core_ext/date_time/calculations.rb @@ -79,29 +79,6 @@ class DateTime change(:hour => 23, :min => 59, :sec => 59) end - # 1.9.3 defines + and - on DateTime, < 1.9.3 do not. - if DateTime.public_instance_methods(false).include?(:+) - def plus_with_duration(other) #:nodoc: - if ActiveSupport::Duration === other - other.since(self) - else - plus_without_duration(other) - end - end - alias_method :plus_without_duration, :+ - alias_method :+, :plus_with_duration - - def minus_with_duration(other) #:nodoc: - if ActiveSupport::Duration === other - plus_with_duration(-other) - else - minus_without_duration(other) - end - end - alias_method :minus_without_duration, :- - alias_method :-, :minus_with_duration - end - # Adjusts DateTime to UTC by adding its offset value; offset is set to 0 # # Example: -- cgit v1.2.3