[1.9] Add Numeric#i
-------------------
Key: JRUBY-4476
URL: http://jira.codehaus.org/browse/JRUBY-4476
Project: JRuby
Issue Type: New Feature
Components: Core Classes/Modules, Ruby 1.9, RubySpec
Affects Versions: JRuby 1.4, JRuby 1.5
Environment: github trunk, Java 6, Mac OS X 10.6.2
Reporter: Hiro Asari
Fix For: JRuby 1.5
Attachments: 0001-Implement-Numeric-i-in-1.9-mode.patch
Numeric#i is a new method in 1.9.2.
The absence is causing a couple of spec failures such as these:
{noformat}
11)
Numeric#i returns a Complex object ERROR
NoMethodError: undefined method `i' for 34:Fixnum
/Users/asari/Development/src/jruby/spec/ruby/core/numeric/i_spec.rb:6
/Users/asari/Development/src/jruby/spec/ruby/core/numeric/i_spec.rb:4
/Users/asari/Development/src/jruby/spec/ruby/core/numeric/i_spec.rb:3
/Users/asari/Development/src/jruby/spec/ruby/core/numeric/i_spec.rb:55:in `load'
12)
Numeric#i sets the real part to 0 ERROR
NoMethodError: undefined method `i' for 7342:Fixnum
/Users/asari/Development/src/jruby/spec/ruby/core/numeric/i_spec.rb:10
/Users/asari/Development/src/jruby/spec/ruby/core/numeric/i_spec.rb:4
/Users/asari/Development/src/jruby/spec/ruby/core/numeric/i_spec.rb:3
/Users/asari/Development/src/jruby/spec/ruby/core/numeric/i_spec.rb:55:in `load'
13)
Numeric#i sets the imaginary part to self ERROR
NoMethodError: undefined method `i' for 62.81:Float
/Users/asari/Development/src/jruby/spec/ruby/core/numeric/i_spec.rb:14
/Users/asari/Development/src/jruby/spec/ruby/core/numeric/i_spec.rb:4
/Users/asari/Development/src/jruby/spec/ruby/core/numeric/i_spec.rb:3
/Users/asari/Development/src/jruby/spec/ruby/core/numeric/i_spec.rb:55:in `load'
{noformat}
The attached patch implements this method.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email