lib/async/http/endpoint.rb in async-http-0.49.0 vs lib/async/http/endpoint.rb in async-http-0.49.1
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+#
# Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
@@ -124,11 +126,11 @@
# Return the path and query components of the given URL.
def path
buffer = @url.path || "/"
if query = @url.query
- buffer << "?#{query}"
+ buffer = "#{buffer}?#{query}"
end
return buffer
end
@@ -195,10 +197,10 @@
yield self.class.new(@url, endpoint, **@options)
end
end
def key
- [@url.scheme, @url.userinfo, @url.host, @url.port, @options]
+ [@url, @options]
end
def eql? other
self.key.eql? other.key
end
\ No newline at end of file