> Does anybody else think it is a serious issue that a Proc holds > references to all variables (including self) where it was > created (through a block)? These references are held through > Proc#binding. Although this does add some useful capability on > occasion, this causes excess memory to be used (worst case > could be a leaky program). Is this worth it? Personally, I > think not. I'd propose that Proc#binding return something that > only have access to variables referenced in the Proc. Even the > self from the defining context would be prohibited if not > referenced (possibly implicitly) in the Proc. Another option > would be to make these references weak so that they won't > prevent GC and those references would disappear if the > referenced object (including the variables/variable-table) is > GCed. Which variables does a proc reference, when it uses eval, looks things up via symbols, etc, etc? You can't know in advance. For an editor (or irb/completion) a best effort approach is OK, for a binding, it is not OK. +--- Kero ------------------------- kero@chello@nl ---+ | all the meaningless and empty words I spoke | | Promises -- The Cranberries | +--- M38c --- http://members.chello.nl/k.vangelder ---+