fixes #7812 - pass URI string in to fix empty? error on Ruby 1.8/1.9