diff --git a/lib/octokit/client/issues.rb b/lib/octokit/client/issues.rb
index <HASH>..<HASH> 100644
--- a/lib/octokit/client/issues.rb
+++ b/lib/octokit/client/issues.rb
@@ -28,7 +28,8 @@ module Octokit
       #   @client = Octokit::Client.new(:login => 'foo', :password => 'bar')
       #   @client.list_issues
       def list_issues(repository = nil, options = {})
-        paginate "#{Repository.new(repository).path}/issues", options
+        path = repository ? "#{Repository.new(repository).path}/issues" : "issues"
+        paginate path, options
       end
       alias :issues :list_issues
Correctly generate issues path

Previously `Repository.new(nil)` would return `nil` so our path would
be `/issues`. It now correctly raises an error so if a repository
isn't specified then we want the issues for the user so the path
should be `issues`.