Subject:
Re: [ruby-ffi] Re: segfault on windows MRI but not windows JRuby
From:
Jon
Date:
12/15/09 10:19 AM
To:
ruby-ffi@googlegroups.com

> How about this?
> http://gist.github.com/256660

The gist works on my "ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]" without a segfault :)

...and I now see your point about the outdated "callback" in library.rb in 0.5.4 that's now been updated in master.  Thank you.


FYI, the same gist on my JRuby 1.4.0 (1.8 and 1.9 modes) gives the following

C:\Users\Jon\Documents\RubyDev\sandbox>jruby ffi_enumwin_fix.rb
ffi_enumwin_fix.rb:15:in `callback': wrong # of arguments(3 for 2) (ArgumentError)
        from ffi_enumwin_fix.rb:35

...which looking over JRuby's lib/ruby/site_ruby/shared/ffi/library.rb shows the same outdated "callback" which I just noticed as of this morning hasn't yet been committed to http://github.com/jruby/jruby/blob/master/lib/ruby/site_ruby/shared/ffi/library.rb