[double post]

of course, mine isn't much better if you're doing

hash.update(...).foo.meow.update(...)

as opposed to

((hash << ... <<).foo.meow << ...)...

so maybe it is a bad idea... :-)

My main use is in cases with:
a = enum.inject(Hash.new) {|h, f|
  h.update(k(f) => v(f))
}

for some odd reason,
  a = enum.inject(Hash.new) {|h, f|
    h << k(f) << v(f)
  }
just `feels' better to me.


On Wed, 20 Oct 2004 10:22:10 -0400, Matt Maycock <ummaycoc / gmail.com> wrote:
> I really just wanted to show the chaining thing - but there may be
> other methods in between that give issues with doing it all at once.
> 
> ~Me!
> 
> 
> 
> 
> On Wed, 20 Oct 2004 23:17:35 +0900, James Edward Gray II
> <james / grayproductions.net> wrote:
> > On Oct 20, 2004, at 9:04 AM, Matt Maycock wrote:
> >
> > > So, unless you count merge! and update, there doesn't seem to be a way
> > > to shove stuff into a hash and get the resulting updated hash back.
> > > Now, I know merge and update make it real easy:
> > >
> > >   h = {}
> > >   h.update(:a => :b).update(:c => :d).update(:e => :f)
> >
> > Why use this over:
> >
> > h.update(:a => :b, :c => :d, :e => :f)
> >
> > ?
> >
> > James Edward Gray II
> >
> >
> 
> --
> There's no word in the English language for what you do to a dead
> thing to make it stop chasing you.
> 


-- 
There's no word in the English language for what you do to a dead
thing to make it stop chasing you.