FFI: Caching of mapped types broken.
------------------------------------

                 Key: JRUBY-5760
                 URL: http://jira.codehaus.org/browse/JRUBY-5760
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.6.1
            Reporter: Matijs van Zuijlen
            Assignee: Thomas E Enebo


The following code will print two identical lines with MRI 1.8.7, MRI 1.9.2 and 
JRuby 1.5.1:

{noformat}
require 'ffi'

module Foo
  extend FFI::Library
  Enum = enum :FooEnum, [:a, :b, :c] 
end

puts FFI.find_type Foo::Enum
puts FFI.find_type Foo::Enum
{noformat}

With JRuby 1.6.1, the lines are not identical. It seems the caching logic in 
`lib/ruby/site_ruby/shared/ffi/types.rb` is broken, with the code storing the 
mapped type in the type map coming before the code for checking the presence of 
the mapped type in the type map.

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