[#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: ts <decoux@...>
Date: 2003-10-12 15:13:06 UTC
List: ruby-core #1625
>>>>> "d" == daz  <dooby@d10.karoo.co.uk> writes:

d>         val = list.fetch(key) {:return_nil}  # <---
d>         return nil if val == :return_nil     # <---

 Well, if you don't like the original construct (return in {}), you must
 know that you find it frequently with #callcc. Something like

   def tt
      callcc {|cc| return cc}
      # etc
   end

 This is really valid.


Guy Decoux







In This Thread