[Ironruby-core] FW: Bignum Parsing

Peter Bacon Darwin bacondarwin at googlemail.com
Mon Nov 19 08:56:41 EST 2007


And neither did this.

Pete

 

From: Peter Bacon Darwin [mailto:bacondarwin at googlemail.com] 
Sent: Sunday,18 November 18, 2007 06:56
To: 'ironruby-core at rubyforge.org'
Subject: Bignum Parsing

 

A simple patch that gets the parsing of Bignums by the Ruby Tokenizer up and
running.

 

A new Create method in BigInteger uses the same algorithm, more or less, as
IronPython so I assume that this is OK; clearly it could be optimized but
then how often are Bignums parsed in anyway?

 

Patched up the Tokenizer too so that it calls this method and you can now
write really big numbers into rbx, like

 

>>> 88888888888888888888888888.

=> #<Bignum:0x0000058>

 

Pete

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071119/066ff69b/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BigIntegerParsing.patch
Type: application/octet-stream
Size: 2328 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/ironruby-core/attachments/20071119/066ff69b/attachment.obj 


More information about the Ironruby-core mailing list