きしもとです 手元の環境で、最新版(r57227 の変更以降)で、以下のような スクリプトを実行しながら、topコマンドでインタプリタのプロセスを 見ていると、リークがあるようで、SIZE, RES がじりじりと増えて ゆきます。 ```ruby # fdiv_leak_sample A = 0x4000_0000_0000_0000 B = 0x4000_0000_0000_0000 def f A.fdiv B end ...metanest (Makoto Kishimoto)
For example, ~~~ a = 3 b = 0x20_0000_0000_0001 p a.fdiv(b) p Rational(a, b).to_f #=> 3.3306690738754696e-16 3.330669073875469e-16 ~~~ I'm hacking to solve this problem, see diff view. https://github.com/ruby/ruby/compare/t...metanest (Makoto Kishimoto)
A new method Integer#mod_pow, power with modulo. a.mod_pow(b, m) #=> (a**b) % m Sometimes a**b becomes very large number, then naive implementation may be unefficient. Fast implementation is useful. (with USE_GMP symbol, this ...metanest (Makoto Kishimoto)