From: Sam Stephenson Date: 2004-12-05T01:47:29+09:00 Subject: Re: Is there a way to get the name of symbol passed to method? On Sun, 5 Dec 2004 01:14:57 +0900, Nicholas Van Weerdenburg wrote: > Is there a way to get the name of the symbol passed to a method? > > e.g. > > def geterdone(array) > # funkify array- but I want to know name of original symbol, not > array, and prefix each element with it > newarray=array.select(...){...} > end > > oldarray=[val1, val2, ...] > newarray=geterdone(oldarray) > # newarray is now ["oldarray:val1", "oldarray:val2", ...] > Not without one of the parse-tree hook extensions, I would think. And even then, what would you expect to happen here? | newarray = geterdone([val1, val2, ...]) > Thanks, > Nick Sam