diff options
| author | ttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-04-05 16:33:01 +0000 |
|---|---|---|
| committer | ttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-04-05 16:33:01 +0000 |
| commit | aaea02b4477c3ff4083f55d15027c239fbcbfeaf (patch) | |
| tree | 2b69e9cbc05e85bf50d8d865278fe5fb22f3c3a9 /ext/dl | |
| parent | d96d6fc7366a523ff2a5f8c03a8c8300ec72f521 (diff) | |
| download | ruby-aaea02b4477c3ff4083f55d15027c239fbcbfeaf.tar.gz ruby-aaea02b4477c3ff4083f55d15027c239fbcbfeaf.tar.xz ruby-aaea02b4477c3ff4083f55d15027c239fbcbfeaf.zip | |
"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
Diffstat (limited to 'ext/dl')
| -rw-r--r-- | ext/dl/lib/dl/import.rb | 6 |
1 files changed, 5 insertions, 1 deletions
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 |
