1

The following snippet

if false
  p 'should not happen'
  foo = 42
end

p defined? foo
p foo.inspect

When evaluated it prints out "local-variable" and "nil". Please explain what Ruby is doing behind the scenes.

0 Answers0