From 778bbac8ac2ae50f0987c4888f7158296ee5bbdd Mon Sep 17 00:00:00 2001 From: normal Date: Sun, 10 Jan 2016 00:35:43 +0000 Subject: stdlib: avoid extra calls to eliminate "\n" from Base64 We may use the '0' (zero) to avoid adding the line feed. Furthermore, the '*' (asterisk) modifier is not needed for a single-element arrays. * ext/psych/lib/psych/visitors/yaml_tree.rb (visit_String): eliminate chomp * lib/net/http.rb (connect): eliminate delete * lib/net/http/header.rb (basic_encode): ditto * lib/net/imap.rb (authenticate): eliminate gsub (self.encode_utf7): shorten delete arg * lib/net/smtp.rb (base64_encode): eliminate gsub * lib/open-uri.rb (OpenURI.open_http): eliminate delete * lib/rss/rss.rb: ditto * lib/securerandom.rb (base64): ditto (urlsafe_base64): eliminate delete! * lib/webrick/httpauth/digestauth.rb (split_param_value): eliminate chop * lib/webrick/httpproxy.rb (do_CONNECT): eliminate delete (setup_upstream_proxy_authentication): ditto [ruby-core:72666] [Feature #11938] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index f6b1d601d9..193a05876d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +Sun Jan 10 09:14:42 2016 Eric Wong + + * ext/psych/lib/psych/visitors/yaml_tree.rb (visit_String): + eliminate chomp + * lib/net/http.rb (connect): eliminate delete + * lib/net/http/header.rb (basic_encode): ditto + * lib/net/imap.rb (authenticate): eliminate gsub + (self.encode_utf7): shorten delete arg + * lib/net/smtp.rb (base64_encode): eliminate gsub + * lib/open-uri.rb (OpenURI.open_http): eliminate delete + * lib/rss/rss.rb: ditto + * lib/securerandom.rb (base64): ditto + (urlsafe_base64): eliminate delete! + * lib/webrick/httpauth/digestauth.rb (split_param_value): + eliminate chop + * lib/webrick/httpproxy.rb (do_CONNECT): eliminate delete + (setup_upstream_proxy_authentication): ditto + [ruby-core:72666] [Feature #11938] + Sat Jan 9 23:19:14 2016 Kuniaki IGARASHI * test/ruby/test_hash.rb (test_try_convert): Add test for -- cgit v1.2.3