2008/11/4 Daniel Vartanov <daniel.vartanov / gmail.com>:
> I am trying to replace .+ operator of Numeric class if and only if
> argument (summand) is my own class.
>
> To be more specific: I am writing geometry module in Ruby and need to
> implement vector-number multiplication so that both:
>
> 2 * vector
> vector * 2
>
> work well.

Daniel, look at [ruby-talk:98763], for example here:

  http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/98763

Regards,
Pit