Skip to content

Commit

Permalink
Fix incompatibility with Rails 2.3 (closes #117)
Browse files Browse the repository at this point in the history
  • Loading branch information
weppos committed Sep 7, 2011
1 parent 1e54b5b commit 146a7ad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rdoc
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion 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'
Expand Down
3 changes: 1 addition & 2 deletions 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.
Expand Down

0 comments on commit 146a7ad

Please sign in to comment.