From: "ngoto (Naohisa Goto)" Date: 2012-12-11T22:22:14+09:00 Subject: [ruby-core:50756] [ruby-trunk - Bug #7543][Open] DL::Function#bound? and unbound raise error when Fiddle is available Issue #7543 has been reported by ngoto (Naohisa Goto). ---------------------------------------- Bug #7543: DL::Function#bound? and unbound raise error when Fiddle is available https://bugs.ruby-lang.org/issues/7543 Author: ngoto (Naohisa Goto) Status: Open Priority: Normal Assignee: Category: ext Target version: ruby -v: - When Fiddle is available, DL::Function#unbind raises error. require 'dl' require 'dl/func' include DL f = Function.new(CFunc.new(0, TYPE_INT, 'test'), [TYPE_INT, TYPE_INT]) f.bind { |x,y| x + y } f.unbind The above code raises the following error in "f.unbind". /XXXX/lib/ruby/2.0.0/dl/func.rb:160:in `unbind': undefined method `ptr' for #<#:0x007f8e8f29ad40> (NoMethodError) from -:6:in `
' When Fiddle is available, DL::Function#bound? also raises error. require 'dl' require 'dl/func' include DL f = Function.new(CFunc.new(0, TYPE_INT, 'test'), [TYPE_INT, TYPE_INT]) f.bind { |x,y| x + y } f.bound? The above code raises the following error in "f.bound?". /XXXX/lib/ruby/2.0.0/dl/func.rb:174:in `bound?': undefined method `ptr' for #<#:0x007f6708842cb0> (NoMethodError) from -:6:in `
' -- http://bugs.ruby-lang.org/