What does nil mean?


..... What does 'nil' mean?


nil is the counterpart of something. In Ruby, something, meaning anything except false and nil is truthy.

nil is the response of the interpreter when there is no return value from a method. Consider some Ruby built-ins, such as puts and print. Neither of these have return values.

x = puts "No return value"
puts x


No return value

Notice how the console adds its own closing response, nil.