Hello,
Is there any way to get the path of a loaded module ?
I think I have two concurent versions of the same module and I can't
figure which one is loaded.
Thx,
Jonathan.
···
--
Posted via http://www.ruby-forum.com/.
Hello,
Is there any way to get the path of a loaded module ?
I think I have two concurent versions of the same module and I can't
figure which one is loaded.
Thx,
Jonathan.
--
Posted via http://www.ruby-forum.com/.
Here is something to try:
def script_find(name)
name += '.rb.' if name !~ /\.rb$/
$LOAD_PATH.inject() do |result, path|
if test(?e, File.join(path, name))
result << path
end
result
end
end
p script_find('singleton')
Ryan
On 1/15/06, Jonathan DERROUGH <jonathan.derrough@no-log.org> wrote:
Hello,
Is there any way to get the path of a loaded module ?
I think I have two concurent versions of the same module and I can't
figure which one is loaded.Thx,
Jonathan.