From: Tom Sawyer Date: 2002-12-27T17:12:12+09:00 Subject: viral arguments thanks for all the response on the float problem. alot of people jumped on that one. guess everyone but me knew the answer. :-) anyway, i'm sitting here coding my billy-bad-ass cgi accounting system, in yours truly, ruby, and i'm running into small sticky spots in which i want to keep a library i created pure for general use, yet i run into particular situations where the behavior needs a minor tweak to work. upon looking at these recoccuring catches, i started to develop a notion of "virus-like" arguments. the idea is that rather then pass simple argumments, one could pass a little piece of code that would execute in the context of the method. here's a foo example (vproc is like proc but viral): def foo(x) i = 1 puts "#{x + i}" end puts foo(4) --> 5 puts foo(vproc {i + 1}) --> 3 any thoughts? can ruby achieve something like this already? -transami