From: Haoqi Haoqi Date: 2007-05-01T14:47:20+09:00 Subject: Re: LONG2NUM vs LONG2FIX Joel VanderWerf wrote: > Haoqi Haoqi wrote: >> what's the difference about "LONG2NUM and LONG2FIX" in ruby c api? > > LONG2FIX will truncate into a Fixnum (a 31 bit signed integer). LONG2NUM > will convert to Bignum (arbitrary precision integer) if necessary. > >> why not "return LONG2FIX after FIX2LONG"?? >> thanks. > > (-2**30).class # => Fixnum > (2**30).class # => Bignum > (-2**30).abs.class # => Bignum Thank you~ -- Posted via http://www.ruby-forum.com/.