This is a performance optimization for common (read: integer) numbers: http://ruby-doc.org/core/classes/Fixnum.html
>> ((1 << 30) - 1).class
=> Fixnum
>> ((1 << 30)).class
=> Bignum
>> ((1 << 30) - 1).object_id
=> 2147483647
>> ((1 << 30) - 1).object_id
=> 2147483647
>> (1<<30).object_id
=> 166070
>> (1<<30).object_id
=> 161200
One thing that confused the issue a little for me is the fact that some objects in Ruby are actually only really 'pretend objects'. ie:
I don't know enough about the deeper parts of the language to know what else there is that's like this though...