This strange behavier really surprised me..
irb(main):006:0> [].push(*[])
ArgumentError: wrong number arguments (at least 1)
from (irb):6:in `push'
from (irb):6
Why is it illigal to concatenate an empty set ?
I expected Rubys Array class to work just like a normal set.
This seems *VERY* non-intuitive to me (POLS).
Array#unshift doesn't like zero arguments neither.
An ugly hack to avoid it could be:
@data.unshift(*objs) unless objs.empty?
Can it be made legal to push/unshift with zero arguments ?
--
Simon Strandgaard