1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

"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
This commit is contained in:
ttate 2002-04-05 16:33:01 +00:00
parent 8d08d9f513
commit f027ab80dc

View file

@ -20,6 +20,10 @@ module DL
end end
end end
def [](name)
return @SYM[name.to_s][0]
end
def dlload(*libnames) def dlload(*libnames)
if( !defined?(@LIBS) ) if( !defined?(@LIBS) )
@LIBS = [] @LIBS = []
@ -107,7 +111,7 @@ module DL
"module_function :#{mname}", "module_function :#{mname}",
].join("\n") ].join("\n")
return @SYM[mname] return sym
} }
raise(RuntimeError, "can't find #{name}.") raise(RuntimeError, "can't find #{name}.")
end end