From aaea02b4477c3ff4083f55d15027c239fbcbfeaf 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: http://svn.ruby-lang.org/repos/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') diff --git a/ext/dl/lib/dl/import.rb b/ext/dl/lib/dl/import.rb index a9d1806a0..ef0c79c21 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