Skip to content

Instantly share code, notes, and snippets.

@toretore
Created Feb 24, 2010
Embed
What would you like to do?
module Kernel
def recurse(*a, &b)
send(caller(1).first[/`(.*?)'\Z/, 1], *a, &b)
end
end
class Foo
def bar(stop=false)
puts 'bar'
recurse(true) unless stop
end
end
Foo.new.bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment