From: Daniel Carrera Date: 2003-02-09T10:17:22+09:00 Subject: Re: help overloading operators Thanks Chris. That solved the problem. Though I don't really understand what I just did. I sort of blindly copied the code from complex.rb. [snip] > The problem is from the Complex#coerce code: > > > def coerce(other) > if Complex.generic?(other) > return Complex.new(other), self > else > super > end > end [snip] What does #coerce? do. What does that 'super' do? In particular, how does that solve the addition problem? Once again, thank you very much. I never would have figured that out. -- Daniel Carrera Graduate Teaching Assistant. Math Dept. University of Maryland. (301) 405-5137