Forum: Ruby method_missing

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
robertj (Guest)
on 2006-03-07 00:09
(Received via mailing list)

is there a way to find out if a method was called using parens or not.
that is there some hidden parameter that tells me


maybe the ruby docs is missing the following? :-)

def method_missing(_id, [very_secret_flag_for_parens], *_args, &_block)

ciao robertj
Daniel A. (Guest)
on 2006-03-07 00:52
(Received via mailing list)
Nope. I guess you could walk up the backtrace, get the file and line
number and parse it out of the code where you're method was called.
I'd wouldn't recommend that, for various reasons.

So, as far as I know, no. Sorry.

Dan Amelang
This topic is locked and can not be replied to.