From: Robert Klemme Date: 2009-11-20T22:50:45+09:00 Subject: Re: make an exmpersion simpler 2009/11/20 Tor Erik Linnerud : > Michal Burak wrote: >> i wan add all elements from list1 to list2 > > That is not what your code does. > > This should work: > > list2.concat(list1 || []) Here's a variant which will avoid the creation of the empty array: list1 and list2.concat list1 I would not explicitly check for empty list. Array#concat will handle that efficiently in C code. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/