------_extPart_001_01C53906.28EDE438
Content-Type: text/plain;
	charsets-ascii"
Content-Transfer-Encoding: quoted-printable

Hello,

I tried to fix the Math.sqrt() domain error on windows I reported an
hour ago by redefining the Math.sqrt method:

module Math

  alias sqrt_old sqrt

  def Math.sqrt(x)

    begin

      Math.sqrt_old(x)

    rescue Errno::EDOM

      return 0.0/0.0

    end

  end

end

 

But this does not work. Apparently, I cannot create an alias to a module
method. I tested a bit and found out I could not create aliases to class
functions either. How can I create aliases to module methods and class
methods?

 

Greetings,

Geert.

PS:I found some confusing thread about creating class method aliases so
I ask it here again


------_extPart_001_01C53906.28EDE438--