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