rubinius/rubinius — Issue #1364: Float#** fails with StackError (infinite loop) when Complex::Unify is defined
Author: guilleiguaran
Created: 2011-10-25 19:42:17+00:00
State: open

Float#** fails with StackError (infinite loop) when when receive a Float arg, Complex::Unify is defined and mathn is required. This script can reproduce the problem:

```ruby
require "mathn"
class Complex
Unify = true
end
(-0.1)**(-0.1)
```

Output:

```
An exception occurred running bug.rb
StackError (StackError)

Backtrace:
BasicObject(Fixnum)#!= at kernel/bootstrap/basicobject.rb:14
Float#** at rubinius/lib/19/mathn.rb:203
Float#** at rubinius/lib/19/mathn.rb:204 (4194 times)
Object#__script__ at bug.rb:5
Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:65
Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:107
Rubinius::Loader#script at kernel/loader.rb:626
Rubinius::Loader#main at kernel/loader.rb:780
```

In MRI and JRuby works as expected