Project

General

Profile

Actions

Feature #11938

closed

[PATCH] cleanup: stdlib: avoid extra calls to eliminate "\n" from Base64

Added by normalperson (Eric Wong) over 8 years ago. Updated over 8 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:72666]

Description

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.


Files

Actions #1

Updated by Anonymous over 8 years ago

  • Status changed from Open to Closed

Applied in changeset r53488.


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]
Actions

Also available in: Atom PDF

Like0
Like0