Skip to content

Instantly share code, notes, and snippets.

@taq

taq/circular.rb

Created Feb 17, 2015
Embed
What would you like to do?
Ruby 2.2.0 circular reference problem
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