S
Stefan Kanev
[Note: parts of this message were removed to make it a legal post.]
Hey guys.
I have a rather weird question. I want to write a function that
programatically determines the arguments passed to its caller. Say, if i do
$stuff = []
def bar(arg)
foo
end
def foo
first_arg = ....
$stuff << first_arg
end
bar(42)
# By this point, $stuff would be [42]
I know it is quite the contrived question, but I'm not interested in doing
something practical. Any leads?
Hey guys.
I have a rather weird question. I want to write a function that
programatically determines the arguments passed to its caller. Say, if i do
$stuff = []
def bar(arg)
foo
end
def foo
first_arg = ....
$stuff << first_arg
end
bar(42)
# By this point, $stuff would be [42]
I know it is quite the contrived question, but I'm not interested in doing
something practical. Any leads?