On Sun, Jan 12, 2003 at 10:00:05PM +0900, ts wrote: > >>>>> "M" == Mauricio =?iso-8859-1?Q?Fern=E1ndez?= <Mauricio> writes: > > M> irb(main):005:0> p(*(xs.select { |x| x < 0 })|nil) > > You have written this > > *(xs.select { |x| x < 0 } | nil) > > #select return an Array and ruby is trying > > pigeon% ruby -e '[1,2]|nil' > -e:1:in `|': failed to convert nil into Array (TypeError) > from -e:1 > pigeon% I see it, but that is not my point (just a side-way test): batsman@tux-chan:/tmp$ ruby -e "p (*([]) || 'was false') " batsman@tux-chan:/tmp$ ruby -e "p (([]) || 'was false') " [] Although *([]) expands to 'void' (not nil, nothing), it is "true". It feels kinda strange that "nothing" is true. > > Guy Decoux -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com ECRC hat keine lynx komp. seiten, sowas MUSS ja pleite gehen ;-)= -- Getty on #LinuxGER