Vinutha Nayak created JRUBY-6300:
------------------------------------

             Summary: TestMethodmissing testcase  fails with Java 7
                 Key: JRUBY-6300
                 URL: https://jira.codehaus.org/browse/JRUBY-6300
             Project: JRuby
          Issue Type: Bug
          Components: Launcher
    Affects Versions: JRuby 1.7
            Reporter: Vinutha Nayak
            Assignee: Thomas E Enebo
             Fix For: JRuby 1.7


Run the following ruby script. This testcase seems to be part of the one that 
is shipped with ruby 1.7.0 source . 

require 'test/unit'

class TestMethodMissing < Test::Unit::TestCase
    
    class AMethodMissingClass
        def method_missing name, *args
            1
        end
    end
    
    def test_attr_assign_missing_returns_rhs
        assert_equal(AMethodMissingClass.new.foo=2, 2) 
<-----------------------------------------
        assert_equal(eval("AMethodMissingClass.new.foo=2"), 2)
    end

end


The reason for failure with 1.7.0 seems to be there because it is not getting 
the value "2" assigned in the pointed out assertion. 
Hence the comparison happens between value "1" and "2" and the failure occurs.

One more observation here is that when I run the script with --debug option , 
i.e as "jruby --debug  test.rb " failure isn't seen. 



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.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