This is has been bugging me for quite some time.
>> nil.id (irb):2: warning: Object#id will be deprecated; use Object#object_id => 4
This is because nil is an object created when the language initializes, and that object's id happens to always be 4.
For more information about why the id happens to be 4, see this blog post.