[#1611] set_trace_func/Array#fetch error — "Nathaniel Talbott" <nathaniel@...>

I've reduced the error I reported in ruby-talk:84013 to the following code:

17 messages 2003/10/11

Re: Yielding to a block from a proc?

From: Sean Russell <ser@...>
Date: 2003-10-08 21:39:22 UTC
List: ruby-core #1595
On Wednesday 08 October 2003 16:00, Christoph wrote:
> > > Though this is fairly weird (does anyone use it?), it's entirely in
> > > keeping with the fact that blocks have access to the blocks that were
> > > passed into their scope:
> >
> > How does that matter?
>
> It seems to me that George gave a good explanation why passing
> blocks to procs doesn't make sense  in the first place, since this
> already happens, albeit  differently, anyway?

I wasn't arguing the usefulness of being able to pass blocks to procs.  In 
fact, I as much as said that I agree with George on this topic, insofar as I 
have any opinion at all.  I was proposing that the argument that there would 
be scoping conflicts with Procs passed to Procs is a fallacy, in that they 
would be subject to the same scoping rules that other objects are subject to.

I bothered to point this out in case someone does point out a really good 
reason to allow passing procs to procs -- AFAICS, scoping issues aren't a  
/technical/ reason why it couldn't be implemented.

--- SER

In This Thread