summaryrefslogtreecommitdiff
path: root/ext/dl/lib
diff options
context:
space:
mode:
authorttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-04-05 16:33:01 +0000
committerttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-04-05 16:33:01 +0000
commitf027ab80dcfc1d5507aecaa553a629d2149c8528 (patch)
tree2b69e9cbc05e85bf50d8d865278fe5fb22f3c3a9 /ext/dl/lib
parent8d08d9f5134a07af00f9e2ef8a4938e40503f873 (diff)
"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
Diffstat (limited to 'ext/dl/lib')
-rw-r--r--ext/dl/lib/dl/import.rb6
1 files changed, 5 insertions, 1 deletions
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