Hello community,

here is the log from the commit of package rubygem-ffi for openSUSE:Factory 
checked in at 2015-06-30 10:17:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-ffi (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-ffi.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-ffi"

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-ffi/rubygem-ffi.changes  2015-03-19 
21:17:26.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-ffi.new/rubygem-ffi.changes     
2015-06-30 10:17:53.000000000 +0200
@@ -1,0 +2,6 @@
+Sat Jun 27 04:30:12 UTC 2015 - [email protected]
+
+- updated to version 1.9.9
+ see installed ChangeLog
+
+-------------------------------------------------------------------

Old:
----
  ffi-1.9.8.gem

New:
----
  ffi-1.9.9.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-ffi.spec ++++++
--- /var/tmp/diff_new_pack.C7eHCw/_old  2015-06-30 10:17:54.000000000 +0200
+++ /var/tmp/diff_new_pack.C7eHCw/_new  2015-06-30 10:17:54.000000000 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-ffi
-Version:        1.9.8
+Version:        1.9.9
 Release:        0
 %define mod_name ffi
 %define mod_full_name %{mod_name}-%{version}

++++++ ffi-1.9.8.gem -> ffi-1.9.9.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Rakefile new/Rakefile
--- old/Rakefile        2015-03-15 03:46:02.000000000 +0100
+++ new/Rakefile        2015-06-26 22:18:25.000000000 +0200
@@ -1,6 +1,7 @@
 require 'rubygems/tasks'
 require 'rbconfig'
 require 'rake/clean'
+require File.expand_path("./lib/ffi/version")
 
 USE_RAKE_COMPILER = (RUBY_PLATFORM =~ /java/) ? false : true
 if USE_RAKE_COMPILER
@@ -13,11 +14,6 @@
 require 'rspec/core/rake_task'
 require 'rubygems/package_task'
 
-RSpec::Core::RakeTask.new(:spec => :compile) do |config|
-  config.rspec_opts = YAML.load_file 'spec/spec.opts'
-end
-
-
 LIBEXT = case RbConfig::CONFIG['host_os'].downcase
   when /darwin/
     "dylib"
@@ -81,38 +77,31 @@
 
 TEST_DEPS = [ LIBTEST ]
 if RUBY_PLATFORM == "java"
-  desc "Run all specs"
-  task :specs, [:options] => TEST_DEPS do |t, args|
-    sh %{#{Gem.ruby} -w -S rspec #{args.options || 
Dir["spec/ffi/*_spec.rb"].join(" ")} -fs --color}
-  end
-  desc "Run rubinius specs"
-  task :rbxspecs => TEST_DEPS do
-    sh %{#{Gem.ruby} -w -S rspec #{Dir["spec/ffi/rbx/*_spec.rb"].join(" ")} 
-fs --color}
+  RSpec::Core::RakeTask.new(:spec) do |config|
+    config.rspec_opts = YAML.load_file 'spec/spec.opts'
   end
 else
-  TEST_DEPS.unshift :compile
-  desc "Run all specs"
-  task :specs, [:options] => TEST_DEPS do |t, args|
-    ENV["MRI_FFI"] = "1"
-    sh %{#{Gem.ruby} -w -Ilib -I#{BUILD_EXT_DIR} -S rspec #{args.options || 
Dir["spec/ffi/*_spec.rb"].join(" ")} -fs --color}
-  end
-  desc "Run rubinius specs"
-  task :rbxspecs => TEST_DEPS do
-    ENV["MRI_FFI"] = "1"
-    sh %{#{Gem.ruby} -w -Ilib -I#{BUILD_EXT_DIR} -S rspec 
#{Dir["spec/ffi/rbx/*_spec.rb"].join(" ")} -fs --color}
+  RSpec::Core::RakeTask.new(:spec => :compile) do |config|
+    config.rspec_opts = YAML.load_file 'spec/spec.opts'
   end
+
+  TEST_DEPS.unshift :compile
 end
 
 desc "Build all packages"
 task :package => 'gem:package'
 
-CLOBBER.include 'build'
-CLOBBER.include FileList['lib/**/ffi_c.so']
-CLOBBER.include FileList["lib/**/ffi_c.#{RbConfig::CONFIG['DLEXT']}"]
 CLOBBER.include 'lib/ffi/types.conf'
-CLOBBER.include 'conftest.dSYM'
 CLOBBER.include 'pkg'
-CLOBBER.include 'spec/ffi/fixtures/libtest.dylib'
+
+CLEAN.include 'build'
+CLEAN.include 'conftest.dSYM'
+CLEAN.include 'spec/ffi/fixtures/libtest.dylib'
+CLEAN.include FileList["pkg/ffi-#{FFI::VERSION}-*-mingw32"]
+CLEAN.include FileList["pkg/ffi-#{FFI::VERSION}-java"]
+CLEAN.include FileList['lib/1.*']
+CLEAN.include FileList['lib/2.*']
+CLEAN.include 'bin'
 
 task :distclean => :clobber
 
@@ -185,27 +174,23 @@
     ext.cross_platform = %w[i386-mingw32 x64-mingw32]                     # 
forces the Windows platform instead of the default one
   end
 
-  task 'gem:win32' => ['gem:win32-x64', 'gem:win32-i386']
+  ENV['RUBY_CC_VERSION'] ||= '1.8.7:1.9.3:2.0.0:2.1.5:2.2.1'
 
-  task 'gem:win32-i386' do
-    sh("rake cross native:i386-mingw32 gem 
RUBY_CC_VERSION='1.8.7:1.9.3:2.0.0:2.1.5:2.2.1'") || raise("win32-i386 build 
failed!")
-  end
-
-  task 'gem:win32-x64' do
-    sh("rake cross native:x64-mingw32 gem 
RUBY_CC_VERSION='2.0.0:2.1.5:2.2.1'") || raise("win32-x64 build failed!")
-  end
-
-  (ENV['RUBY_CC_VERSION'] || '1.8.7:1.9.3:2.0.0:2.1.5:2.2.1' 
).to_s.split(':').each do |ruby_version|
+  ENV['RUBY_CC_VERSION'].to_s.split(':').each do |ruby_version|
     task "copy:ffi_c:i386-mingw32:#{ruby_version}" do |t|
       sh "i686-w64-mingw32-strip -S 
#{BUILD_DIR}/i386-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/ffi_c.so"
     end
-  end
 
-  (ENV['RUBY_CC_VERSION'] || '2.0.0:2.1.5:2.2.1' ).to_s.split(':').each do 
|ruby_version|
     task "copy:ffi_c:x64-mingw32:#{ruby_version}" do |t|
       sh "x86_64-w64-mingw32-strip -S 
#{BUILD_DIR}/x64-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/ffi_c.so"
     end
   end
+
+  desc "build a windows gem without all the ceremony."
+  task "gem:windows" do
+    require "rake_compiler_dock"
+    RakeCompilerDock.sh "bundle && rake cross native gem MAKE='nice make 
-j`nproc`'"
+  end
 end
 
 Gem::Tasks.new do |t|
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/ffi_c/MemoryPointer.c 
new/ext/ffi_c/MemoryPointer.c
--- old/ext/ffi_c/MemoryPointer.c       2015-03-15 03:46:02.000000000 +0100
+++ new/ext/ffi_c/MemoryPointer.c       2015-06-26 22:18:25.000000000 +0200
@@ -75,7 +75,7 @@
  * @param [Numeric] count number of cells in memory
  * @param [Boolean] clear set memory to all-zero if +true+
  * @return [self]
- * A new instance of FFI::MeoryPointer.
+ * A new instance of FFI::MemoryPointer.
  */
 static VALUE
 memptr_initialize(int argc, VALUE* argv, VALUE self)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/ffi_c/MethodHandle.c new/ext/ffi_c/MethodHandle.c
--- old/ext/ffi_c/MethodHandle.c        2015-03-15 03:46:02.000000000 +0100
+++ new/ext/ffi_c/MethodHandle.c        2015-06-26 22:18:25.000000000 +0200
@@ -132,12 +132,6 @@
 #ifndef CUSTOM_TRAMPOLINE
 static void attached_method_invoke(ffi_cif* cif, void* retval, METHOD_PARAMS 
parameters, void* user_data);
 
-static ffi_type* methodHandleParamTypes[] = {
-    &ffi_type_sint,
-    &ffi_type_pointer,
-    &ffi_type_ulong,
-};
-
 static ffi_cif mh_cif;
 
 static bool
@@ -339,7 +333,12 @@
 rbffi_MethodHandle_Init(VALUE module)
 {
 #ifndef CUSTOM_TRAMPOLINE
-    ffi_status ffiStatus;
+    ffi_status ffiStatus;      
+    ffi_type* methodHandleParamTypes[] = {
+        &ffi_type_sint,
+        &ffi_type_pointer,
+        &ffi_type_ulong,
+    };
 #endif
 
     defaultClosurePool = rbffi_ClosurePool_New((int) trampoline_size(), 
prep_trampoline, NULL);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/ffi_c/StructLayout.c new/ext/ffi_c/StructLayout.c
--- old/ext/ffi_c/StructLayout.c        2015-03-15 03:46:02.000000000 +0100
+++ new/ext/ffi_c/StructLayout.c        2015-06-26 22:18:25.000000000 +0200
@@ -510,8 +510,8 @@
 static VALUE
 struct_layout_union_bang(VALUE self) 
 {
-    static const ffi_type *alignment_types[] = { &ffi_type_sint8, 
&ffi_type_sint16, &ffi_type_sint32, &ffi_type_sint64,
-                                                 &ffi_type_float, 
&ffi_type_double, &ffi_type_longdouble, NULL };
+    const ffi_type *alignment_types[] = { &ffi_type_sint8, &ffi_type_sint16, 
&ffi_type_sint32, &ffi_type_sint64,
+                                          &ffi_type_float, &ffi_type_double, 
&ffi_type_longdouble, NULL };
     StructLayout* layout;
     ffi_type *t = NULL;
     int count, i;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/ffi_c/extconf.rb new/ext/ffi_c/extconf.rb
--- old/ext/ffi_c/extconf.rb    2015-03-15 03:46:02.000000000 +0100
+++ new/ext/ffi_c/extconf.rb    2015-06-26 22:18:25.000000000 +0200
@@ -33,10 +33,11 @@
   $defs << "-DHAVE_EXTCONF_H" if $defs.empty? # needed so create_header works
   $defs << "-DUSE_INTERNAL_LIBFFI" unless libffi_ok
   $defs << "-DRUBY_1_9" if RUBY_VERSION >= "1.9.0"
+  $defs << "-DFFI_BUILDING" if RbConfig::CONFIG['host_os'] =~ /mswin/ # for 
compatibility with newer libffi
 
   create_header
   
-  $LOCAL_LIBS << " ./libffi/.libs/libffi_convenience.lib" if 
RbConfig::CONFIG['host_os'] =~ /mswin/
+  $LOCAL_LIBS << " ./libffi/.libs/libffi_convenience.lib" if !libffi_ok && 
RbConfig::CONFIG['host_os'] =~ /mswin/
 
   create_makefile("ffi_c")
   unless libffi_ok
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ffi.gemspec new/ffi.gemspec
--- old/ffi.gemspec     2015-03-15 03:46:02.000000000 +0100
+++ new/ffi.gemspec     2015-06-26 22:18:25.000000000 +0200
@@ -17,6 +17,7 @@
   s.required_ruby_version = '>= 1.8.7'
   s.add_development_dependency 'rake', '~> 10.1'
   s.add_development_dependency 'rake-compiler', '~> 0.9'
+  s.add_development_dependency 'rake-compiler-dock', '~> 0.3.1'
   s.add_development_dependency 'rspec', '~> 2.14.1'
   s.add_development_dependency 'rubygems-tasks', "~> 0.2.4"
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/ffi/autopointer.rb new/lib/ffi/autopointer.rb
--- old/lib/ffi/autopointer.rb  2015-03-15 03:46:02.000000000 +0100
+++ new/lib/ffi/autopointer.rb  2015-06-26 22:18:25.000000000 +0200
@@ -161,9 +161,9 @@
     # CallableReleaser is a {Releaser} used when an {AutoPointer} is defined 
with a
     # Proc or a Method.
     class CallableReleaser < Releaser
+      # Release +ptr+ by using Proc or Method defined at +ptr+ 
{AutoPointer#initialize initialization}.
       # @param [Pointer] ptr
       # @return [nil]
-      # Release +ptr+ by using Proc or Method defined at +ptr+ 
{AutoPointer#initialize initialization}.
       def release(ptr)
         @proc.call(ptr)
       end
@@ -183,8 +183,8 @@
     #
     # Override {DataConverter#from_native}.
     # @overload self.from_native(ptr, ctx)
-    # @param [Pointer] ptr 
-    # @param ctx not used. Please set +nil+.
+    #   @param [Pointer] ptr
+    #   @param ctx not used. Please set +nil+.
     # @return [AutoPointer]
     def self.from_native(val, ctx)
       self.new(val)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/ffi/enum.rb new/lib/ffi/enum.rb
--- old/lib/ffi/enum.rb 2015-03-15 03:46:02.000000000 +0100
+++ new/lib/ffi/enum.rb 2015-06-26 22:18:25.000000000 +0200
@@ -85,6 +85,7 @@
     include DataConverter
 
     attr_reader :tag
+    attr_reader :native_type
 
     # @overload initialize(info, tag=nil)
     #   @param [nil, Enumerable] info
@@ -94,7 +95,7 @@
     #   @param [nil, Enumerable] info symbols and values for new Enum
     #   @param [nil, Symbol] tag name of new Enum
     def initialize(*args)
-      @native_type = args.shift if args.first.kind_of?(FFI::Type)
+      @native_type = args.first.kind_of?(FFI::Type) ? args.shift : Type::INT
       info, @tag = *args
       @kv_map = Hash.new
       unless info.nil?
@@ -149,12 +150,6 @@
     alias to_h symbol_map
     alias to_hash symbol_map
 
-    # Get native type of Enum
-    # @return [Type]
-    def native_type
-      @native_type || Type::INT
-    end
-
     # @param [Symbol, Integer, #to_int] val
     # @param ctx unused
     # @return [Integer] value of a enum symbol
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/ffi/library.rb new/lib/ffi/library.rb
--- old/lib/ffi/library.rb      2015-03-15 03:46:02.000000000 +0100
+++ new/lib/ffi/library.rb      2015-06-26 22:18:25.000000000 +0200
@@ -292,24 +292,26 @@
     end
 
     # @overload attach_variable(mname, cname, type)
-    #  @example
-    #   module Bar
-    #     extend FFI::Library
-    #     ffi_lib 'my_lib'
-    #     attach_variable :c_myvar, :myvar, :long
-    #   end
-    #   # now callable via Bar.c_myvar
+    #   @param [#to_s] mname name of ruby method to attach as
+    #   @param [#to_s] cname name of C variable to attach
+    #   @param [DataConverter, Struct, Symbol, Type] type C variable's type
+    #   @example
+    #     module Bar
+    #       extend FFI::Library
+    #       ffi_lib 'my_lib'
+    #       attach_variable :c_myvar, :myvar, :long
+    #     end
+    #     # now callable via Bar.c_myvar
     # @overload attach_variable(cname, type)
-    #  @example
-    #   module Bar
-    #     extend FFI::Library
-    #     ffi_lib 'my_lib'
-    #     attach_variable :myvar, :long
-    #   end
-    #   # now callable via Bar.myvar
-    # @param [#to_s] mname name of ruby method to attach as
-    # @param [#to_s] cname name of C variable to attach
-    # @param [DataConverter, Struct, Symbol, Type] type C varaible's type
+    #   @param [#to_s] mname name of ruby method to attach as
+    #   @param [DataConverter, Struct, Symbol, Type] type C variable's type
+    #   @example
+    #     module Bar
+    #       extend FFI::Library
+    #       ffi_lib 'my_lib'
+    #       attach_variable :myvar, :long
+    #     end
+    #     # now callable via Bar.myvar
     # @return [DynamicLibrary::Symbol]
     # @raise {FFI::NotFoundError} if +cname+ cannot be found in libraries
     #
@@ -360,10 +362,12 @@
 
 
     # @overload callback(name, params, ret)
+    #   @param name callback name to add to type map
+    #   @param [Array] params array of parameters' types
+    #   @param [DataConverter, Struct, Symbol, Type] ret callback return type
     # @overload callback(params, ret)
-    # @param name callback name to add to type map
-    # @param [Array] params array of parameters' types
-    # @param [DataConverter, Struct, Symbol, Type] ret callback return type
+    #   @param [Array] params array of parameters' types
+    #   @param [DataConverter, Struct, Symbol, Type] ret callback return type
     # @return [FFI::CallbackInfo]
     def callback(*args)
       raise ArgumentError, "wrong number of arguments" if args.length < 2 || 
args.length > 3
@@ -388,10 +392,6 @@
       cb
     end
 
-    # @param [DataConverter, Symbol, Type] old
-    # @param  add
-    # @param [] info
-    # @return [FFI::Enum, FFI::Type]
     # Register or get an already registered type definition.
     #
     # To register a new type definition, +old+ should be a {FFI::Type}. +add+
@@ -404,6 +404,11 @@
     # * in others cases, +info+ is used to create a named enum.
     #
     # If +old+ is a key for type map, #typedef get +old+ type definition.
+    #
+    # @param [DataConverter, Symbol, Type] old
+    # @param [Symbol] add
+    # @param [Symbol] info
+    # @return [FFI::Enum, FFI::Type]
     def typedef(old, add, info=nil)
       @ffi_typedefs = Hash.new unless defined?(@ffi_typedefs)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/ffi/platform.rb new/lib/ffi/platform.rb
--- old/lib/ffi/platform.rb     2015-03-15 03:46:02.000000000 +0100
+++ new/lib/ffi/platform.rb     2015-06-26 22:18:25.000000000 +0200
@@ -79,7 +79,7 @@
     def self.is_os(os)
       OS == os
     end
-    
+
     NAME = "#{ARCH}-#{OS}"
     IS_GNU = defined?(GNU_LIBC)
     IS_LINUX = is_os("linux")
@@ -87,12 +87,12 @@
     IS_FREEBSD = is_os("freebsd")
     IS_NETBSD = is_os("netbsd")
     IS_OPENBSD = is_os("openbsd")
+    IS_SOLARIS = is_os("solaris")
     IS_WINDOWS = is_os("windows")
     IS_BSD = IS_MAC || IS_FREEBSD || IS_NETBSD || IS_OPENBSD
     CONF_DIR = File.join(File.dirname(__FILE__), 'platform', NAME)
-    public
 
-    
+    public
 
     LIBPREFIX = case OS
     when /windows/
@@ -143,6 +143,12 @@
       IS_MAC
     end
 
+    # Test if current OS is Solaris (Sun OS)
+    # @return [Boolean]
+    def self.solaris?
+      IS_SOLARIS
+    end
+
     # Test if current OS is a unix OS
     # @return [Boolean]
     def self.unix?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/ffi/struct.rb new/lib/ffi/struct.rb
--- old/lib/ffi/struct.rb       2015-03-15 03:46:02.000000000 +0100
+++ new/lib/ffi/struct.rb       2015-06-26 22:18:25.000000000 +0200
@@ -341,7 +341,7 @@
       # @raise if Ruby 1.8
       # Add hash +spec+ to +builder+.
       def hash_layout(builder, spec)
-        raise "Ruby version not supported" if RUBY_VERSION =~ /1.8.*/
+        raise "Ruby version not supported" if RUBY_VERSION =~ /1\.8\.*/
         spec[0].each do |name, type|
           builder.add name, find_field_type(type), nil
         end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/ffi/struct_layout_builder.rb 
new/lib/ffi/struct_layout_builder.rb
--- old/lib/ffi/struct_layout_builder.rb        2015-03-15 03:46:02.000000000 
+0100
+++ new/lib/ffi/struct_layout_builder.rb        2015-06-26 22:18:25.000000000 
+0200
@@ -30,12 +30,12 @@
 #
 
 module FFI
-  
+
   # Build a {StructLayout struct layout}.
   class StructLayoutBuilder
     attr_reader :size
     attr_reader :alignment
-    
+
     def initialize
       @size = 0
       @alignment = 1
@@ -45,42 +45,47 @@
       @fields = Array.new
     end
 
-    # @param [Numeric] size
     # Set size attribute with +size+ only if +size+ is greater than attribute 
value.
+    # @param [Numeric] size
     def size=(size)
       @size = size if size > @size
     end
 
-    # @param [Numeric] alignment
-    # Set alignment attribute with +alignment+ only if it is greater than 
attribute value.
+    # Set alignment attribute with +align+ only if it is greater than 
attribute value.
+    # @param [Numeric] align
     def alignment=(align)
       @alignment = align if align > @alignment
       @min_alignment = align
     end
 
-    # @param [Boolean] is_union
-    # @return [is_union]
     # Set union attribute.
     # Set to +true+ to build a {Union} instead of a {Struct}.
+    # @param [Boolean] is_union
+    # @return [is_union]
     def union=(is_union)
       @union = is_union
     end
 
-    # @return [Boolean]
     # Building a {Union} or a {Struct} ?
+    #
+    # @return [Boolean]
+    #
     def union?
       @union
     end
 
     # Set packed attribute
-    # @overload packed=(packed)
-    #  @param [Fixnum] packed
-    #  @return [packed]
-    #  Set alignment and packed attributes to +packed+.
-    # @overload packed=(packed)
-    #  @param packed
-    #  @return [0,1]
-    #  Set packed attribute.
+    # @overload packed=(packed) Set alignment and packed attributes to
+    #   +packed+.
+    #
+    #   @param [Fixnum] packed
+    #
+    #   @return [packed]
+    # @overload packed=(packed) Set packed attribute.
+    #   @param packed
+    #
+    #   @return [0,1]
+    #
     def packed=(packed)
       if packed.is_a?(Fixnum)
         @alignment = packed
@@ -139,7 +144,7 @@
     def add_field(name, type, offset = nil)
       add(name, type, offset)
     end
-    
+
     # @param (see #add)
     # @return (see #add)
     # Add a struct as a field to the builder.
@@ -162,14 +167,14 @@
     def build
       # Add tail padding if the struct is not packed
       size = @packed ? @size : align(@size, @alignment)
-      
+
       layout = StructLayout.new(@fields, size, @alignment)
       layout.__union! if @union
       layout
     end
 
     private
-    
+
     # @param [Numeric] offset
     # @param [Numeric] align
     # @return [Numeric]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/ffi/types.rb new/lib/ffi/types.rb
--- old/lib/ffi/types.rb        2015-03-15 03:46:02.000000000 +0100
+++ new/lib/ffi/types.rb        2015-06-26 22:18:25.000000000 +0200
@@ -155,7 +155,7 @@
     native_type Type::POINTER
 
     # @param [Pointer] val
-    # @param [] ctx
+    # @param ctx
     # @return [Array(String, Pointer)]
     # Returns a [ String, Pointer ] tuple so the C memory for the string can 
be freed
     def self.from_native(val, ctx)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/ffi/version.rb new/lib/ffi/version.rb
--- old/lib/ffi/version.rb      2015-03-15 03:46:02.000000000 +0100
+++ new/lib/ffi/version.rb      2015-06-26 22:18:25.000000000 +0200
@@ -1,4 +1,4 @@
 module FFI
-  VERSION = '1.9.8'
+  VERSION = '1.9.9'
 end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/ffi.rb new/lib/ffi.rb
--- old/lib/ffi.rb      2015-03-15 03:46:02.000000000 +0100
+++ new/lib/ffi.rb      2015-06-26 22:18:25.000000000 +0200
@@ -1,19 +1,7 @@
 if !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
   Object.send(:remove_const, :FFI) if defined?(::FFI)
   begin
-    if RUBY_VERSION =~ /1\.8/
-      require '1.8/ffi_c'
-    elsif RUBY_VERSION =~ /1\.9/
-      require '1.9/ffi_c'
-    elsif RUBY_VERSION =~ /2\.0/
-      require '2.0/ffi_c'
-    elsif RUBY_VERSION =~ /2\.1/
-      require '2.1/ffi_c'
-    elsif RUBY_VERSION =~ /2\.2/
-      require '2.2/ffi_c'
-    else
-      require 'ffi_c'
-    end
+    require RUBY_VERSION.split('.')[0, 2].join('.') + '/ffi_c'
   rescue Exception
     require 'ffi_c'
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2015-03-15 03:46:02.000000000 +0100
+++ new/metadata        2015-06-26 22:18:25.000000000 +0200
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: ffi
 version: !ruby/object:Gem::Version
-  version: 1.9.8
+  version: 1.9.9
 platform: ruby
 authors:
 - Wayne Meissner
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2015-03-15 00:00:00.000000000 Z
+date: 2015-06-26 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: rake
@@ -39,6 +39,20 @@
       - !ruby/object:Gem::Version
         version: '0.9'
 - !ruby/object:Gem::Dependency
+  name: rake-compiler-dock
+  requirement: !ruby/object:Gem::Requirement
+    requirements:
+    - - "~>"
+      - !ruby/object:Gem::Version
+        version: 0.3.1
+  type: :development
+  prerelease: false
+  version_requirements: !ruby/object:Gem::Requirement
+    requirements:
+    - - "~>"
+      - !ruby/object:Gem::Version
+        version: 0.3.1
+- !ruby/object:Gem::Dependency
   name: rspec
   requirement: !ruby/object:Gem::Requirement
     requirements:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/ffi/managed_struct_spec.rb 
new/spec/ffi/managed_struct_spec.rb
--- old/spec/ffi/managed_struct_spec.rb 2015-03-15 03:46:02.000000000 +0100
+++ new/spec/ffi/managed_struct_spec.rb 2015-06-26 22:18:25.000000000 +0200
@@ -38,7 +38,8 @@
     
expect(ClassWithSelfRef.new(ManagedStructTestLib.ptr_from_address(0x12345678)).class).to
 eq(ClassWithSelfRef)
   end
 
-  it "should release memory properly" do
+  # see #427
+  it "should release memory properly", :broken => true do
     class PleaseReleaseMe < FFI::ManagedStruct
       layout :i, :int
       @@count = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/ffi/pointer_spec.rb new/spec/ffi/pointer_spec.rb
--- old/spec/ffi/pointer_spec.rb        2015-03-15 03:46:02.000000000 +0100
+++ new/spec/ffi/pointer_spec.rb        2015-06-26 22:18:25.000000000 +0200
@@ -170,7 +170,8 @@
     def self.release(ptr); end
   end
 
-  it "cleanup via default release method" do
+  # see #427
+  it "cleanup via default release method", :broken => true do
     expect(AutoPointerSubclass).to 
receive(:release).at_least(loop_count-wiggle_room).times
     AutoPointerTestHelper.reset
     loop_count.times do
@@ -182,7 +183,8 @@
     AutoPointerTestHelper.gc_everything loop_count
   end
 
-  it "cleanup when passed a proc" do
+  # see #427
+  it "cleanup when passed a proc", :broken => true do
     #  NOTE: passing a proc is touchy, because it's so easy to create a memory 
leak.
     #
     #  specifically, if we made an inline call to
@@ -200,7 +202,8 @@
     AutoPointerTestHelper.gc_everything loop_count
   end
 
-  it "cleanup when passed a method" do
+  # see #427
+  it "cleanup when passed a method", :broken => true do
     expect(AutoPointerTestHelper).to 
receive(:release).at_least(loop_count-wiggle_room).times
     AutoPointerTestHelper.reset
     loop_count.times do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/ffi/rbx/attach_function_spec.rb 
new/spec/ffi/rbx/attach_function_spec.rb
--- old/spec/ffi/rbx/attach_function_spec.rb    2015-03-15 03:46:02.000000000 
+0100
+++ new/spec/ffi/rbx/attach_function_spec.rb    2015-06-26 22:18:25.000000000 
+0200
@@ -25,7 +25,7 @@
   
   it "correctly populates a struct for gettimeofday" do
     t = Timeval.new
-    time = LibC.gettimeofday(t.pointer, nil)
+    LibC.gettimeofday(t.pointer, nil)
     expect(t[:tv_sec]).to be_kind_of(Numeric)
     expect(t[:tv_usec]).to be_kind_of(Numeric)
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/ffi/spec_helper.rb new/spec/ffi/spec_helper.rb
--- old/spec/ffi/spec_helper.rb 2015-03-15 03:46:02.000000000 +0100
+++ new/spec/ffi/spec_helper.rb 2015-06-26 22:18:25.000000000 +0200
@@ -7,6 +7,10 @@
 require 'fileutils'
 require 'ffi'
 
+RSpec.configure do |c|
+  c.filter_run_excluding :broken => true
+end
+
 CPU = case RbConfig::CONFIG['host_cpu'].downcase
   when /i[3456]86/
     # Darwin always reports i686, even when running in 64bit mode
@@ -53,13 +57,7 @@
 
   dir = File.expand_path(path, File.dirname(__FILE__))
   lib = "#{dir}/#{lib}"
-  if !File.exists?(lib)
-    ldshared  = RbConfig::CONFIG["LDSHARED"] || "clang -dynamic -bundle"
-    libs      = RbConfig::CONFIG["LIBS"]
-    dldflags  = RbConfig::CONFIG["DLDFLAGS"] || "-Wl,-undefined,dynamic_lookup 
-Wl,-multiply_defined,suppress"
-
-    puts Dir.pwd, dir, File.dirname(__FILE__)
-
+  if !File.exist?(lib)
     output = nil
     FileUtils.cd(dir) do
       output = system(*%{#{system('which gmake >/dev/null') && 'gmake' || 
'make'} CPU=#{CPU} OS=#{OS} }.tap{|x| puts x.inspect})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/ffi/struct_spec.rb new/spec/ffi/struct_spec.rb
--- old/spec/ffi/struct_spec.rb 2015-03-15 03:46:02.000000000 +0100
+++ new/spec/ffi/struct_spec.rb 2015-06-26 22:18:25.000000000 +0200
@@ -7,6 +7,7 @@
 
 describe "Struct aligns fields correctly" do
   it "char, followed by an int" do
+    pending("not supported in 1.8") if RUBY_VERSION =~ /1.8.*/
     class CIStruct < FFI::Struct
       layout :c => :char, :i => :int
     end
@@ -14,6 +15,7 @@
   end
 
   it "short, followed by an int" do
+    pending("not supported in 1.8") if RUBY_VERSION =~ /1.8.*/
     class SIStruct < FFI::Struct
       layout :s => :short, :i => :int
     end
@@ -21,6 +23,7 @@
   end
 
   it "int, followed by an int" do
+    pending("not supported in 1.8") if RUBY_VERSION =~ /1.8.*/
     class IIStruct < FFI::Struct
       layout :i1 => :int, :i => :int
     end
@@ -28,6 +31,7 @@
   end
 
   it "long long, followed by an int" do
+    pending("not supported in 1.8") if RUBY_VERSION =~ /1.8.*/
     class LLIStruct < FFI::Struct
       layout :l => :long_long, :i => :int
     end
@@ -102,7 +106,7 @@
     smp = FFI::MemoryPointer.new :pointer
     s = PointerMember.new smp
     expect { s[:pointer] = s }.not_to raise_error Exception
-    expect { foo = s[:pointer] }.not_to raise_error Exception
+    expect { s[:pointer].nil? }.not_to raise_error Exception
   end
 
   it "Struct#[:pointer]=nil" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/spec.opts new/spec/spec.opts
--- old/spec/spec.opts  2015-03-15 03:46:02.000000000 +0100
+++ new/spec/spec.opts  2015-06-26 22:18:25.000000000 +0200
@@ -1,3 +1,4 @@
 --color
+-w
 --format
 documentation


Reply via email to