From: rpg@...2all.net Date: 2001-01-20T16:07:10+09:00 Subject: [ruby-talk:9584] 3 + 2.im works! why? Hi, As you probably all know. This works: irb> require 'complex' true irb> 3 + 2.im Complex(3, 2) But my question is: why does this work? What is going in ruby's head? As I understood from `Programming Ruby' 3 + 2.im is equivalent to 3.+(2.im). I don't see fixnums having a method that adds complex numbers, so is 3 converted to a complex. No, ruby would not know how to do that, would it? So, maybe ruby changes this to (2.im).+3? I don't know, you tell me. regards, Richard