Permalink
Browse files

Change absolute/relative file test in whence_file

  • Loading branch information...
rocky committed Sep 5, 2011
1 parent c188288 commit 75eef6a353481e098766c44a140c6060eac47cac
Showing with 3 additions and 2 deletions.
  1. +3 −2 app/run.rb
View
@@ -51,8 +51,9 @@ def debug_program(dbgr, program_to_debug)
# Do a shell-like path lookup for prog_script and return the results.
# If we can't find anything return prog_script.
def whence_file(prog_script)
if prog_script.index(File::SEPARATOR)
# Don't search since this name has path separator components
if prog_script.start_with?(File::SEPARATOR) || prog_script.start_with?('.')
# Don't search since this name has path is explicitly absolute or
# relative.
return prog_script
end
for dirname in ENV['PATH'].split(File::PATH_SEPARATOR) do

0 comments on commit 75eef6a

Please sign in to comment.