From: Frank Hirsch <0ffh@...> Date: 2006-05-06T14:57:01+09:00 Subject: Overloading math operations Hija, been makin a little "Vector" class by extending Array. Now I wanna add Vector support to the native numeric data types in ruby. Means: Not only Vector+Numeric but also Numeric+Vector should call my + function. But I have a syntax prolem.. :-( Example (not working!): class Fixnum alias old+ + # here i have the syntax problem def +(other) if (other.class<=Vector) other+self else self.old+(other) end end end Someone please help poor ruby nooby! :-))) Regards, 0ffh -- Posted via http://www.ruby-forum.com/.