G
Giles Bowkett
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.)
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.)