def is_uri?(s)

      return false if s.index("\n")

      ((URI.parse(s); true) rescue false)
    end
def is_uri?(s)

      return false if s.index("\n")

      ((URI.parse(s); true) rescue false)
    end
Minimal test. Used by #read.