lib/tzinfo/timezone_transition_info.rb in tzinfo-0.3.10 vs lib/tzinfo/timezone_transition_info.rb in tzinfo-0.3.11

- old
+ new

@@ -68,20 +68,11 @@ def at unless @at unless @denominator @at = TimeOrDateTime.new(@numerator_or_time) else - r = Rational.send(:new!, @numerator_or_time, @denominator) - - # Ruby 1.8.6 introduced new! and deprecated new0. - # Ruby 1.9.0 removed new0. - # We still need to support new0 for older versions of Ruby. - if DateTime.respond_to? :new! - dt = DateTime.new!(r, 0, Date::ITALY) - else - dt = DateTime.new0(r, 0, Date::ITALY) - end - + r = RubyCoreSupport.rational_new!(@numerator_or_time, @denominator) + dt = RubyCoreSupport.datetime_new!(r, 0, Date::ITALY) @at = TimeOrDateTime.new(dt) end end @at