Michal Suchanek
6/10/2009 10:20:00 PM
On 10/06/2009, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
> Hi,
>
> In message "Re: [Security] Ruby 1.8.6-pl369 released"
>
> on Thu, 11 Jun 2009 01:55:07 +0900, Charles Oliver Nutter <headius@headius.com> writes:
>
> |> 1.9.2 BigDecimal#to_f produces Inf for too big numbers. I am not sure
> |> what we can do for BigDecimal#to_i yet.
> |
> |So Inf is official behavior then? I'm in process of at least getting
> |JRuby up to 1.9.x behavior for these cases.
>
>
> Yes, if it doesn't cause any serious issue.
>
>
> |Perhaps we can examine the size of the exponent for to_i to determine
> |whether it's within a reasonable range?
>
>
> Could be, if we can define "reasonable range".
Perhaps it could be set by a variable (like $KCODE).
It might be useful to make it somewhat $SAFE dependent, too.
However, what is the issue here, exactly?
Is it that a BigDecimal can have a large exponent for which zeroes
have to be generated while converting to a Bignum?
Thanks
Michal