diff --git a/CHANGELOG.rdoc b/CHANGELOG.rdoc index eb74e9423..7313b89a6 100644 --- a/CHANGELOG.rdoc +++ b/CHANGELOG.rdoc @@ -6,6 +6,8 @@ * FIXED: whois.nic.it parser doesn't correctly understand reserved domains. +* FIXED: Release 2.1.0 is not compatible under Rails 2.3 (#117). + == Release 2.1.0 diff --git a/lib/core_ext.rb b/lib/core_ext.rb index 996f8cd87..553b490ed 100644 --- a/lib/core_ext.rb +++ b/lib/core_ext.rb @@ -1,4 +1,4 @@ -if defined?(ActiveSupport) && ActiveSupport::VERSION::MAJOR == 3 +if defined?(ActiveSupport::VERSION) && ActiveSupport::VERSION::MAJOR == 3 require 'active_support/core_ext/array/wrap' require 'active_support/core_ext/date_time/conversions' require 'core_ext/class/attribute' diff --git a/lib/core_ext/date_time/conversions.rb b/lib/core_ext/date_time/conversions.rb index d824597cd..0d0a90a59 100644 --- a/lib/core_ext/date_time/conversions.rb +++ b/lib/core_ext/date_time/conversions.rb @@ -1,10 +1,9 @@ require 'date' - 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 if instance_methods.include?(:to_time) # Attempts to convert self to a Ruby Time object; returns self if out of range of Ruby Time class. # If self has an offset other than 0, self will just be returned unaltered, since there's no clean way to map it to a Time.