Created
February 17, 2015 14:54
-
-
Save taq/b72f4ccfb8fa1f878fca to your computer and use it in GitHub Desktop.
Ruby 2.2.0 circular reference problem
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 FooBar | |
def foo | |
"I'm in foo!" | |
end | |
def bar(foo = foo) | |
puts foo | |
end | |
end | |
foobar = FooBar.new | |
foobar.bar | |
foobar.bar("Not using foo!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment