[#11073] segfault printing instruction sequence for iterator — <noreply@...>

Bugs item #10527, was opened at 2007-05-02 14:42

14 messages 2007/05/02
[#11142] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Nobuyoshi Nakada <nobu@...> 2007/05/10

Hi,

[#11188] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Paul Brannan <pbrannan@...> 2007/05/16

On Thu, May 10, 2007 at 04:51:18PM +0900, Nobuyoshi Nakada wrote:

[#11234] Planning to release 1.8.6 errata — Urabe Shyouhei <shyouhei@...>

Hi all.

17 messages 2007/05/25

Re: Understanding code: Kernel#require and blocks.

From: Hugh Sasse <hgs@...>
Date: 2007-05-04 09:51:07 UTC
List: ruby-core #11087
On Fri, 4 May 2007, Paul Brannan wrote:

> On Fri, May 04, 2007 at 06:18:19PM +0900, Hugh Sasse wrote:
> > irb(main):008:0> require "footlewuddlewix" {|x| puts "got #{x}" }
> 
> The above does compile on 1.9, but on pre-1.9, you need:
> 
> require("footlewuddlewix") {|x| puts "got #{x}" }

Oh, OK.  The use of a block was for backwards compatibility -- that
it would be ignored by older versions.

Well, I'm reasonably content to let go of this if 1.9 has a new way to
work around this.  Thanks for telling me about that.  I'd like to 
ask "what would break if that were backported to 1.8.x?", since we may
well see 1.8.7 before 2.0.
> 
> > No, if require fails it raises an exception:
> > 
> > irb(main):003:0> require "footlewuddlewix"
> > LoadError: no such file to load -- footlewuddlewix
> >         from (irb):3:in `require'
> >         from (irb):3
> >         from :0
> > irb(main):004:0>
> 
> So does Hash#fetch, if no default value or block is passed in.

Does the analogy extend further -- is there some other way to see
what has been required by consulting a hash/array?
> 
> Paul
> 
        Thank you,
        Hugh

In This Thread