Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.7.0.pre2
    • Fix Version/s: JRuby 1.7.0.pre2
    • Component/s: Extensions
    • Labels:
    • Environment:
      OSX 10.6.8, java7u2
    • Number of attachments :
      0

      Description

      Run the example code:

      https://gist.github.com/3274964

      Output is:

      devmac:ffi-rzmq cremes$ rvm jruby-head
      devmac:ffi-rzmq cremes$ ruby -v
      jruby 1.7.0.preview2.dev (1.9.3p203) 2012-08-06 3737fc5 on OpenJDK 64-Bit Server VM 1.7.0-u2-b21-20111216 [darwin-amd64]
      devmac:ffi-rzmq cremes$ ruby break_jruby.rb
      NoMethodError: undefined method `write_string' for #<FFI::Pointer address=0x10a94c1e0>
      (root) at break_jruby.rb:14

      This example code executes successfully on other runtimes including earlier versions of JRuby (1.6.7.2).

        Activity

        Hide
        Charles Oliver Nutter added a comment -

        Looks like one or more of the .rb files for FFI are no longer getting loaded when you require 'ffi', including pointer.rb which includes the write_string definition.

        Show
        Charles Oliver Nutter added a comment - Looks like one or more of the .rb files for FFI are no longer getting loaded when you require 'ffi', including pointer.rb which includes the write_string definition.
        Hide
        Charles Oliver Nutter added a comment -
        commit aab48ca30b52594eedb2fe1c68f8f61e298b1786
        Author: Charles Oliver Nutter <headius@headius.com>
        Date:   Mon Aug 6 11:58:26 2012 -0500
        
            Fix JRUBY-6821: FFI::Pointer#write_string is missing
            
            ffi/pointer.rb was not being required. We should audit the other
            ffi/*.rb files to ensure everything that should be loading is
            being loaded.
        
        :100644 100644 0f1e0e6... 3c29f96... M	lib/ruby/shared/ffi/ffi.rb
        
        Show
        Charles Oliver Nutter added a comment - commit aab48ca30b52594eedb2fe1c68f8f61e298b1786 Author: Charles Oliver Nutter <headius@headius.com> Date: Mon Aug 6 11:58:26 2012 -0500 Fix JRUBY-6821: FFI::Pointer#write_string is missing ffi/pointer.rb was not being required. We should audit the other ffi/*.rb files to ensure everything that should be loading is being loaded. :100644 100644 0f1e0e6... 3c29f96... M lib/ruby/shared/ffi/ffi.rb

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Chuck Remes
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: