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.
on 2006-01-15 17:52
on 2006-01-17 22:35
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