Desk2Mob

Desk2Mob

Desk2Mob

Ruby 2.3.3 to Ruby 2.4.0

Recently I noticed, there is no Fixnum and Bignum class in Ruby 2.4.0.

$ ruby -v
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin16]
$ irb
>> puts 4.class
Fixnum
>> puts 4.class.superclass
Integer
>> puts 4.class.superclass.superclass
Numeric
>> puts 4.class.superclass.superclass.superclass
Object
>> puts 4.class.superclass.superclass.superclass.superclass
BasicObject

and

$ ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16]
$ irb
>> puts 4.class
Integer
>> puts 4.class.superclass
Numeric
>> puts 4.class.superclass.superclass
Object
>> puts 4.class.superclass.superclass.superclass
BasicObject

We can also check this one in irb console.

$ ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16]
$ irb
>> Fixnum
(irb):1: warning: constant ::Fixnum is deprecated
=> Integer
>> Bignum
(irb):2: warning: constant ::Bignum is deprecated
=> Integer
>>

More Details on following links

Posted on January 04, 2017 by Amit Pandya in Ruby


All Posts