Skip to content

Conversation

@wozozo
Copy link
Contributor

@wozozo wozozo commented Mar 11, 2025

This pull request includes a change to the lib/payjp/util.rb file to improve the url_encode method. The change replaces the initialization of a temporary string variable from an empty string to a new String object for better clarity and potential performance benefits.

  • lib/payjp/util.rb: Modified the url_encode method to initialize the tmp variable using String.new instead of an empty string.

fix #39

@wozozo wozozo requested a review from Copilot March 11, 2025 07:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR refactors the initialization of the temporary variable in the url_encode method for clarity and potential performance benefits.

  • Replaces the empty string initialization with String.new in the url_encode method.
  • Addresses issue #39.

Reviewed Changes

File Description
lib/payjp/util.rb Changed the tmp variable initialization from an empty string to String.new for clarity.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

@wozozo wozozo merged commit e49ec92 into master Mar 14, 2025
7 checks passed
@wozozo wozozo deleted the fix-freeze-string-literals branch March 19, 2025 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ruby 3.4以降で warning: literal string will be frozen in the future の警告が出る

3 participants