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:
parent
8d08d9f513
commit
f027ab80dc
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue