method

search_file_from_ruby_path

v2_1_10 - Show latest stable - Class: IRB::IrbLoader
search_file_from_ruby_path(fn)
public

No documentation available.

# File lib/irb/ext/loader.rb, line 34
    def search_file_from_ruby_path(fn) # :nodoc:
      if /^#{Regexp.quote(File::Separator)}/ =~ fn
        return fn if File.exist?(fn)
        return nil
      end

      for path in $:
        if File.exist?(f = File.join(path, fn))
          return f
        end
      end
      return nil
    end