From f027ab80dcfc1d5507aecaa553a629d2149c8528 Mon Sep 17 00:00:00 2001 From: ttate Date: Fri, 5 Apr 2002 16:33:01 +0000 Subject: "extern" and "[]" of the module Importable returns a symbol. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/dl/lib/dl/import.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (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 a9d1806a04..ef0c79c21f 100644 --- a/ext/dl/lib/dl/import.rb +++ b/ext/dl/lib/dl/import.rb @@ -20,6 +20,10 @@ module DL end end + def [](name) + return @SYM[name.to_s][0] + end + def dlload(*libnames) if( !defined?(@LIBS) ) @LIBS = [] @@ -107,7 +111,7 @@ module DL "module_function :#{mname}", ].join("\n") - return @SYM[mname] + return sym } raise(RuntimeError, "can't find #{name}.") end -- cgit v1.2.3