Accessors arity
---------------

                 Key: JRUBY-3733
                 URL: http://jira.codehaus.org/browse/JRUBY-3733
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
         Environment: jruby 1.3.0RC2 (ruby 1.8.6p287) (2009-05-27 6586) (Java 
HotSpot(TM) Client VM 1.6.0_13) [i386-java]

            Reporter: Andrea Fazzi


I noticed a difference in the arity of accessors between MRI and JRuby:

# MRI

VERSION = 1.8.6-p287
CMD     = ~/.multiruby/install/1.8.6-p287/bin/ruby -S irb

irb(main):001:0> class Foo
irb(main):002:1> attr_accessor :bar
irb(main):003:1> end
=> nil
irb(main):004:0> Foo.new.method(:bar=).arity
=> 1

# JRuby

irb(main):001:0> class Foo
irb(main):002:1> attr_accessor :bar
irb(main):003:1> end
=> nil
irb(main):008:0> Foo.new.method(:bar=).arity
=> -1

JRuby returns -1 for the accessor :bar while MRI 1.8.6 returns 1.


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