[prev in list] [next in list] [prev in thread] [next in thread]
List: ruby-talk
Subject: Re: * operator, Float
From: "=?utf-8?Q?=d0=98=d0=b2=d0=b0=d0=bd_=d0=a1=d1=82=d0=b0=d1=88=d0=ba=d0=be?=" <joh
Date: 2010-07-25 22:51:02
Message-ID: 49e4ab9d18e35d4902f91ec3a55f56c1 () ruby-forum ! com
[Download RAW message or body]
OK, this is clear.
I was able to get the necessary effect using coerce(). What failed was
...
class Float
def *(o)
if o.class == FooBoo then
o.send(:*,o)
else
super
end
end
end
--
Posted via http://www.ruby-forum.com/.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic