There appears to be a threading issue with respond_to. When called from 
multiple threads it sometimes returns incorrectly.
--------------------------------------------------------------------------------------------------------------------------

                 Key: JRUBY-4548
                 URL: http://jira.codehaus.org/browse/JRUBY-4548
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.4
         Environment: OS X, Ubuntu
            Reporter: Gareth Reeves
         Attachments: respond_to_test.rb

~/projects > java -version 
java version "1.6.0_15"
Java(TM) SE Runtime Environment (build 1.6.0_15-b03-219)
Java HotSpot(TM) 64-Bit Server VM (build 14.1-b02-90, mixed mode)
~/projects > jruby --version 
jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-02 69fbfa3) (Java HotSpot(TM) 
64-Bit Server VM 1.6.0_15) [x86_64-java]
~/projects > jruby respond_to_test.rb 
starting
starting
starting
starting
starting
starting
starting
starting
starting
starting
waiting... 
starting
FAIL {"bar"=>#<Bar:0x433f86d5>, "dofoo"=>1}
FAIL {"bar"=>#<Bar:0x7090496e>, "dofoo"=>1}
FAIL {"bar"=>#<Bar:0x5c3b0eb4>, "dofoo"=>1}
respond_to_test.rb:7:in `to_h': undefined method `to_h' for 1:Fixnum 
(NoMethodError)
        from respond_to_test.rb:4:in `each'
        from respond_to_test.rb:4:in `to_h'
        from respond_to_test.rb:51
        from respond_to_test.rb:50:in `times'
        from respond_to_test.rb:50
        from respond_to_test.rb:48:in `initialize'
        from respond_to_test.rb:48:in `new'
        from respond_to_test.rb:48
        from respond_to_test.rb:47:in `each'
        from respond_to_test.rb:47:in `map'
        from respond_to_test.rb:47
~/projects > 


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