Project

General

Profile

Actions

Bug #1477

closed

DL::Function#unbind raises TypeError

Added by sheepman (Takashi Tamura) over 15 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
ruby 1.9.2dev (2009-05-16 trunk 23440) [i686-linux]
Backport:
[ruby-dev:38474]

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 #1

Updated by nobu (Nobuyoshi Nakada) over 15 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r23444.
=end

Actions

Also available in: Atom PDF

Like0
Like0