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