List Info

Thread: Has Rational.new! intentionally been made private?




Has Rational.new! intentionally been made private?
user name
2008-03-30 08:29:20
The recent changes to implement Rational as a built-in C
class have
resulted in the documented Rational.new! method becoming
private. Is
this an intentional change, or will new! be made public
again?

The reason I ask is that my TZInfo library makes use of
Rational.new!
for performance reasons. Calling Kernel#Rational is too
expensive
because of call to Rational.reduce, so I pre-reduce the
required
Rationals and initialize them with Rational.new!.

Thanks,

Phil

-- 
Phil Ross
http://tzinfo.rubyforge.
org/ -- DST-aware timezone library for Ruby


Re: Has Rational.new! intentionally been made private?
country flaguser name
United States
2008-03-30 12:05:48
Philip Ross wrote:
> The recent changes to implement Rational as a built-in
C class have
> resulted in the documented Rational.new! method
becoming private. Is
> this an intentional change, or will new! be made public
again?
> 
> The reason I ask is that my TZInfo library makes use of
Rational.new!
> for performance reasons. Calling Kernel#Rational is too
expensive
> because of call to Rational.reduce, so I pre-reduce the
required
> Rationals and initialize them with Rational.new!.
> 
> Thanks,
> 
> Phil
> 
Is this Ruby 1.8, 1.9 or both?


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )