dave 31% irb
irb(main):001:0> require 'matrix.rb'
=> true
irb(main):002:0> a =Vector[1, 2, 3, 4]
=> Vector[1, 2, 3, 4]
irb(main):003:0> a + a
=> Vector[2, 4, 6, 8]
irb(main):004:0> a * 2
=> Vector[2, 4, 6, 8]
irb(main):005:0> a + 2
TypeError: cannot convert Vector into Float
         from /usr/local/lib/ruby/1.8/matrix.rb:1190:in `coerce'
         from /usr/local/lib/ruby/1.8/matrix.rb:1190:in `+'
         from (irb):5
irb(main):006:0>

dave 32% ruby -v
ruby 1.8.1 (2003-10-31) [powerpc-darwin]

Can anyone point to what is wrong or is this a bug?

Dave.