JRuby operating differently from MRI with andand gem
----------------------------------------------------

                 Key: JRUBY-3954
                 URL: http://jira.codehaus.org/browse/JRUBY-3954
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.3.1
         Environment: Mac OSX, Windows 2008 Server
Rails 2.3.3, andand gem v1.3.1
            Reporter: Paul Flewelling
            Assignee: Thomas E Enebo


The andand gem initially works as expected with JRuby and returns nil, however 
after the 50th invocation of andand it fails and returns "NoMethodError: 
undefined method 'something' for nil:NilClass".  Note, the andand gem works 
without any issues for MRI 

Steps to reproduce as follows:

Start a jruby irb

require 'rubygems'
require 'andand'

nil.andand.something
=> nil

All ok so far, but if you type in the following, JRuby seems to optimize andand 
into failure.

For example: 

50.times do       
 nil.andand.something
end

Results in:
NoMethodError: undefined method 'something' for nil:NilClass



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