Nil
Nil is the class of nil.
nil
< Back to core unit
Get a copy of nil.
IO.println(nil.clone()) #> nil
Return a hash for nil: 0.
0
IO.println(nil.hash) #> 0
Transform nil into a String: "nil"
String
"nil"
IO.println(nil.to_s) #> nil
Return the negation of nil: true. nil is one of the two values (with false) that evaluates to false.
true
false
IO.println(!nil) #> true