Skip to content

Commit e49ec92

Browse files
authored
Merge pull request #41 from payjp/fix-freeze-string-literals
refactor: replace string initialization with String.new for clarity
2 parents 65c81f8 + e67c5a1 commit e49ec92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/payjp/util.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def self.url_encode(key)
7171
# (from URI::RFC2396_Parser#escape)
7272
key.to_s.gsub(Regexp.new("[^#{URI::PATTERN::UNRESERVED}]")) do
7373
us = $&
74-
tmp = ''
74+
tmp = String.new
7575
us.each_byte do |uc|
7676
tmp << sprintf('%%%02X', uc)
7777
end

0 commit comments

Comments
 (0)