[1.9] Object.to_a should be removed
-----------------------------------

                 Key: JRUBY-4322
                 URL: http://jira.codehaus.org/browse/JRUBY-4322
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules, Ruby 1.9
            Reporter: David Calavera


Object.to_a has been removed from Ruby 1.9. This bug could be easily fixed just 
changing the compatibility mode in the method's signature:

{code}
@JRubyMethod(name = "to_a", visibility = Visibility.PUBLIC, compat = 
CompatVersion.RUBY1_8)
{code}

but then Rubyspec doesn't work in 1.9 mode and it gives a NoMethodError for 
Proc.to_a method but it shouldn't because Proc.to_a neither exists in 1.9 mode, 
an example:

{noformat}
da...@david-mirai ~/dev/jruby$ bin/jruby --1.9 spec/mspec/bin/mspec 
spec/ruby/core/array/delete_spec.rb --verbose
jruby 1.5.0.dev (ruby 1.9.2dev trunk 24787) (2009-12-07 ccfcc4b) (Java 
HotSpot(TM) Client VM 1.6.0_16) [i386-java]

/home/david/dev/jruby/spec/ruby/core/array/delete_spec.rb

1)
An exception occurred during: loading 
/home/david/dev/jruby/spec/ruby/core/array/delete_spec.rb ERROR
NoMethodError: undefined method `to_a' for #<Proc:0xbb2bc3>
/home/david/dev/jruby/spec/ruby/core/array/delete_spec.rb:4
/home/david/dev/jruby/spec/ruby/core/array/delete_spec.rb:55:in `load'
{noformat}

-- 
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


Reply via email to