lib/tzinfo/timezone_transition_info.rb in tzinfo-0.3.8 vs lib/tzinfo/timezone_transition_info.rb in tzinfo-0.3.9
- old
+ new
@@ -46,11 +46,11 @@
# previous_offset (both TimezoneOffsetInfo instances) and UTC time.
# if denominator is nil, numerator_or_time is treated as a number of
# seconds since the epoch. If denominator is specified numerator_or_time
# and denominator are used to create a DateTime as follows:
#
- # DateTime.new!(Rational.new!(numerator_or_time, denominator), 0, Date::ITALY)
+ # DateTime.new!(Rational.send(:new!, numerator_or_time, denominator), 0, Date::ITALY)
#
# For performance reasons, the numerator and denominator must be specified
# in their lowest form.
def initialize(offset, previous_offset, numerator_or_time, denominator = nil)
@offset = offset
@@ -68,10 +68,10 @@
def at
unless @at
unless @denominator
@at = TimeOrDateTime.new(@numerator_or_time)
else
- r = Rational.new!(@numerator_or_time, @denominator)
+ 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!