From 7bcc13550437e1c4198fbf6212abc8e7672e1adb Mon Sep 17 00:00:00 2001 From: ttate Date: Mon, 7 Feb 2005 09:45:02 +0000 Subject: Improved DL::Handle#sym. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/dl/lib/dl/import.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ext/dl/lib/dl/import.rb') diff --git a/ext/dl/lib/dl/import.rb b/ext/dl/lib/dl/import.rb index 2ad805598a..ebd84eb471 100644 --- a/ext/dl/lib/dl/import.rb +++ b/ext/dl/lib/dl/import.rb @@ -113,9 +113,10 @@ module DL private :parse_bind_options def extern(signature, *opts) - name, ctype, argtype = parse_signature(signature, @type_alias) + symname, ctype, argtype = parse_signature(signature, @type_alias) opt = parse_bind_options(opts) - f = import_function(name, ctype, argtype, opt[:call_type]) + f = import_function(symname, ctype, argtype, opt[:call_type]) + name = symname.gsub(/@.+/,'') @func_map[name] = f #define_method(name){|*args,&block| f.call(*args,&block)} module_eval(<<-EOS) -- cgit v1.2.3