From: Matt Maycock Date: 2005-02-03T01:48:50+09:00 Subject: Re: Partial function application (was: Re: Binding precedence for first sym...) One thing to make noteworthy are the subtleties bugwise that changing proc can have on a program (that bit me in the rear a couple of times)... I think there should definitely be warnings in any file that does stuff with Proc about such things (as it is entirely subtle, in my opinion)... example: class Proc def data(arg) @arg end def data=(arg) @arg = arg end end anon = Proc.new { p @data } def foo yield end anon[] # prints nil anon.data = 1 anon[] # prints 1 foo(&anon) # prints nil -- thus, internal data is not kept as the structure is transformed from proc to block... ~Me! -- There's no word in the English language for what you do to a dead thing to make it stop chasing you.