From: dblack@... Date: 2006-11-29T05:25:32+09:00 Subject: Re: << == push? Hi -- On Wed, 29 Nov 2006, Giles Bowkett wrote: > I was just prepping a code sample for somebody out in the big wide > world, and doing that always makes me review my code, and I noticed I > was using Array#push a lot instead of << (I think that's Array#<< > actually?). > > So, kind of a basic question, is << basically just idiomatic Ruby for > push? (This was a Rails project with a lot of custom JavaScript and I > think I just got in that particular mindset.) I *think* the only difference is that push can take more than one argument. David -- David A. Black | dblack@wobblini.net Author of "Ruby for Rails" [1] | Ruby/Rails training & consultancy [3] DABlog (DAB's Weblog) [2] | Co-director, Ruby Central, Inc. [4] [1] http://www.manning.com/black | [3] http://www.rubypowerandlight.com [2] http://dablog.rubypal.com | [4] http://www.rubycentral.org