>>>>> "D" == David Heinemeier Hansson <david / loudthinking.com> writes:

D> %w{ one two three }.inject(Array.new) { |a, e| a << e if e != "three" }
                                                  ^^^^^^^^^^^^^^^^^^^^^^

 this is the same than

   if e != "three"
      a << e
   else
      nil
   end

 this is why it return nil


Guy Decoux