From: Martin DeMello Date: 2003-02-05T05:44:57+09:00 Subject: Re: Native rational and complex number implementations? Tobias Peters wrote: > > I know I could define a constant I and write > > 2+3*I > > but it's uglier. Also, Complex.to_s would then produce output valid for > ruby's parser to read. This is prettier: require 'complex' class Numeric def i Complex(0,self) end end p 2+3.i martin