Skip to content

Instantly share code, notes, and snippets.

@novikserg
Created July 23, 2015 15:53
Show Gist options
  • Save novikserg/5b7af1571fa0d253a461 to your computer and use it in GitHub Desktop.
Save novikserg/5b7af1571fa0d253a461 to your computer and use it in GitHub Desktop.
class MyClass
def word
"word"
end
def go
word = word + "whatever"
word
end
end
def local_stuff
mc = MyClass.new
puts mc.go
end
local_stuff # => undefined method `+' for nil:NilClass (NoMethodError)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment