[#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: arity bug?

From: "Christoph" <chr_news@...>
Date: 2003-10-05 16:55:00 UTC
List: ruby-core #1581
"ts" wrote:
...
> svg% ruby -e 'a = proc { p 12 }; a[1,2,3]; b = proc {|| 13 }; b[1]'
> 12
> -e:1: wrong number of arguments (1 for 0) (ArgumentError)
>         from -e:1:in `[]'
>         from -e:1
> svg% 

I known that the calling convention is consistent with the arity 
but since there is no way of accessing the calling arguments
inside  a Proc call like 

proc {  p 12 }[12,13]


it feels that the arity of these Proc's is 0 and not the current -1.


/Christoph 

In This Thread