M
Michal Burak
Any way to make this shorter?
list2 << list1 if list1 && !list1.empty?
Thanks.
list2 << list1 if list1 && !list1.empty?
Thanks.
Michal said:Any way to make this shorter?
list2 << list1 if list1 && !list1.empty?
Thanks.
Michal said:Any way to make this shorter?
list2 << list1 if list1 && !list1.empty?
Thanks.
Michal said:i wan add all elements from list1 to list2
Tor said:Michal said:i wan add all elements from list1 to list2
That is not what your code does.
This should work:
list2.concat(list1 || [])
2009/11/20 Tor Erik Linnerud said:Michal said:i wan add all elements from list1 to list2
That is not what your code does.
This should work:
list2.concat(list1 || [])
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.