Subject:
Re: [ruby-ffi] Re: segfault on windows MRI but not windows JRuby
From:
Luis Lavena
Date:
12/16/09 12:30 AM
To:
ruby-ffi@googlegroups.com

On Tue, Dec 15, 2009 at 1:19 PM, Jon <jon.forums@gmail.com> wrote:
>> 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 :)
>

I can confirm this gist works on the following versions:

ruby 1.8.6 (2009-08-04 patchlevel 383) [i386-mingw32]

ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mingw32]

ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]

ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-mingw32]

ruby 1.9.2dev (2009-11-11 trunk 25717) [i386-mingw32]

ruby 1.8.6 (2009-03-31 patchlevel 368) [i386-mswin32]

ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mswin32]

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

Looks like a bug report to JRuby is needed?
-- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry