diff --git a/activesupport/lib/active_support/core_ext/date_time/conversions.rb b/activesupport/lib/active_support/core_ext/date_time/conversions.rb index 851012e3bf15f..d7b3ad7d8d1e6 100644 --- a/activesupport/lib/active_support/core_ext/date_time/conversions.rb +++ b/activesupport/lib/active_support/core_ext/date_time/conversions.rb @@ -6,7 +6,7 @@ class DateTime # Ruby 1.9 has DateTime#to_time which internally relies on Time. We define our own #to_time which allows # DateTimes outside the range of what can be created with Time. - remove_method :to_time if instance_methods.include?(:to_time) + remove_method :to_time # Convert to a formatted string. See Time::DATE_FORMATS for predefined formats. #