Sard Aukary wrote: > Jim Weirich wrote: >> In your particular case, it can be restated as: >> >> puts "this is a test"[4..-1] >> >> Where the -1 refers to the end of the string. >> >> I'm not sure how your example relates to function arguments ... but is >> this helpfull? >> >> -- Jim Weirich > > Ah yes, -1 is the most obvious way of to get the end reference. > > I was just wondering if there was some sort of reflective way of getting > a reference to the "this is a test" string from with the [] method. No, unless you create one. You could conceivably do this by some extremely evil use of method rerouting, local_variables and such nefarities. Just using variable is your best option, though :) > Thanks. -- Posted via http://www.ruby-forum.com/.