Skip to content

Instantly share code, notes, and snippets.

@toretore
Created February 24, 2010 12:57
Show Gist options
  • Save toretore/313401 to your computer and use it in GitHub Desktop.
Save toretore/313401 to your computer and use it in GitHub Desktop.
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