summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-05 19:09:01 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-05 19:09:01 +0000
commita5c923f6c1ab0ddd68c4debb7c68623ff0cf4e6a ()
tree1e6935db5dd210656930f5353ed892f35ec5b840
parent25d3fc8823cfd11efc6ff732dc9cbe32a7361fe0 (diff)
* lib/uri/http.rb (URI::HTTP#request_uri): optimized.
decrease object allocation, and ensure always create at least one new object for return value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--lib/uri/http.rb10
2 files changed, 11 insertions, 5 deletions
@@ -1,3 +1,9 @@
Wed Aug 6 03:41:21 2014 Aaron Patterson <[email protected]>
* ext/psych/lib/psych/visitors/to_ruby.rb: backwards compatibility for
@@ -93,12 +93,12 @@ module URI
# Otherwise, the path is simply URI#path.
#
def request_uri
- r = path_query
- if r && r[0] != ?/
- r = '/' + r
end
-
- r
end
end