You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ruby -v jruby 9.1.8.0-SNAPSHOT (2.3.1) 2017-02-06 3f97c7a Java HotSpot(TM) 64-Bit Server VM 25.111-b14 on 1.8.0_111-b14 +indy +jit [linux-x86_64]
uname -a Linux ok 4.4.0-59-generic #80-Ubuntu SMP Fri Jan 6 17:47:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Test Case
complex.rb:
o = Object.new
def o.to_c
1i
end
p Complex(o)
Expected Behavior
Should print: (0+1i)
Actual Behavior
Throws error:
TypeError: not a real
rect at org/jruby/RubyComplex.java:356
convert at org/jruby/RubyComplex.java:435
Complex at org/jruby/RubyKernel.java:357
<main> at complex.rb:6
The text was updated successfully, but these errors were encountered:
Environment
jruby 9.1.8.0-SNAPSHOT (2.3.1) 2017-02-06 3f97c7a Java HotSpot(TM) 64-Bit Server VM 25.111-b14 on 1.8.0_111-b14 +indy +jit [linux-x86_64]
Linux ok 4.4.0-59-generic #80-Ubuntu SMP Fri Jan 6 17:47:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Test Case
complex.rb
:Expected Behavior
(0+1i)
Actual Behavior
The text was updated successfully, but these errors were encountered: