Skip to content

Instantly share code, notes, and snippets.

@taq
Created February 17, 2015 14:54
Show Gist options
  • Save taq/b72f4ccfb8fa1f878fca to your computer and use it in GitHub Desktop.
Save taq/b72f4ccfb8fa1f878fca to your computer and use it in GitHub Desktop.
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