This page contains automated test results for code from O'Reilly's Ruby Cookbook. If this code looks interesting or useful, you might want to buy the whole book.

Numbers
CodeExpectedActual
1000.class
Fixnum Fixnum
10000000000.class
Bignum Bignum
(2**30 - 1).class
Fixnum Fixnum
(2**30).class
Bignum Bignum
small = 1000
big = small ** 5
1000000000000000 1000000000000000
big.class
Bignum Bignum
smaller = big / big
1 1
smaller.class
Fixnum Fixnum
0.01.class
Float Float
1.0.class
Float Float
10000000000.00000000001.class
Float Float