[#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: set_trace_func/Array#fetch error

From: "daz" <dooby@...10.karoo.co.uk>
Date: 2003-10-11 16:58:23 UTC
List: ruby-core #1613


> I've reduced the error I reported in ruby-talk:84013 to the following code:
>
>   set_trace_func(proc{})
>
>   def m
>     [].fetch(2) {return nil}

      [].fetch(2) {nil}  # <--------- see Array#fetch w/ block

>   end
>
>   m
>
> Running it produces:
>
>   $ ruby -v t.rb
>   ruby 1.8.0 (2003-10-11) [i686-linux]
>   t.rb:4: unexpected return
>
> Removing the call to set_trace_func removes the error.
>


Lookout forehead ... ;-)


daz




In This Thread