'Stabby' lambdas throw NullPointerException
-------------------------------------------

                 Key: JRUBY-5686
                 URL: http://jira.codehaus.org/browse/JRUBY-5686
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.6RC2, JRuby 1.5.6
         Environment: linux under RVM
            Reporter: T S
            Assignee: Thomas E Enebo


in jruby, using 1.9 mode, lambdas defined using the 'stabby' syntax fail with a 
NullPointerException if they try to access class info. regular lambdas do not.

    a=22
    f=lambda {a.is_a? Array}
    puts f[]
    a=[22]
    puts f[]
    #prints false' true

    a=22
    f=->(){a.is_a? Array}
    puts f[]
    a=[22]
    puts f[]
    #fails with NullPointerException
    

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