aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2012-01-06 12:12:45 -0800
committerSantiago Pastorino <santiago@wyeworks.com>2012-01-06 12:12:45 -0800
commit69fe594e692d5bf58276cb07f318c031c2789e5e (patch)
tree10cc31c12914f25b5b134a76bf17b9d31478864b /activesupport
parent4d7ed974c0983d11f51e04d7969a86519f616495 (diff)
parent4f75809f04ddd5cbfb548feab427666711ffee8a (diff)
downloadrails-69fe594e692d5bf58276cb07f318c031c2789e5e.tar.gz
rails-69fe594e692d5bf58276cb07f318c031c2789e5e.tar.bz2
rails-69fe594e692d5bf58276cb07f318c031c2789e5e.zip
Merge pull request #4358 from castlerock/remove_plus_minus_support_for_ruby18
revert "fixing some tests on ruby 1.9.3"
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/date_time/calculations.rb23
1 files changed, 0 insertions, 23 deletions
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: