Last active
November 24, 2015 03:55
-
-
Save bwilkins/be21cc3b5c62d698c150 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ruby hoist_wtf.rb | |
hoist_wtf.rb:8:in `do_thing': undefined method `+' for nil:NilClass (NoMethodError) | |
from hoist_wtf.rb:13:in `<main>' | |
$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FoobarDoesThings | |
def initialize(foo) | |
@foo=foo | |
end | |
def do_thing | |
foo | |
foo += 1 | |
end | |
attr_reader :foo | |
end | |
FoobarDoesThings.new(1).foo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
^ produces nothing, not an exception either.