Actions
Bug #1477
closedDL::Function#unbind raises TypeError
Description
=begin
コールバックではない単なる DL::Function に対して unbind を呼ぶと
よくわからないエラーが出ます。
$ cat d11.rb
require 'dl/import'
h = DL::Handle.new
addr = h.sym('strlen')
cfunc = DL::CFunc.new(addr, DL::TYPE_INT)
func = DL::Function.new(cfunc, [DL::TYPE_VOIDP])
func.unbind
$ ruby-1.9 -v d11.rb
ruby 1.9.2dev (2009-05-16 trunk 23440) [i686-linux]
/usr/local/pkg/ruby-1.9/lib/ruby/1.9.1/dl/callback.rb:51:in []': no implicit conversion from nil to integer (TypeError) from /usr/local/pkg/ruby-1.9/lib/ruby/1.9.1/dl/callback.rb:51:in
remove_callback_internal'
from /usr/local/pkg/ruby-1.9/lib/ruby/1.9.1/dl/callback.rb:60:in remove_cdecl_callback' from /usr/local/pkg/ruby-1.9/lib/ruby/1.9.1/dl/func.rb:88:in
unbind'
from d11.rb:8:in `'
=end
Actions
Like0
Like0