value is nil.
Everything in Ruby is an object, and so it is: nil.we can get the class of nil:
irb(main):011:0> nil.class
=> NilClass
This turns out to be something very predictable,There is only one instance of NilClass (called nil) and you cannot make any new instances of NilClass.
=> NilClass
No comments :
Post a Comment