Skip to content

Commit

Permalink
Fix "can't modify frozen string" errors when pods are integrated usin…
Browse files Browse the repository at this point in the history
…g the `branch` option (#10920)
  • Loading branch information
Yen-Chia Lin committed Sep 7, 2021
1 parent f890ef6 commit 6d074bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Expand Up @@ -8,8 +8,9 @@

##### Bug Fixes

* None.

* Fix "can't modify frozen string" errors when pods are integrated using the `branch` option
[buju77](https://github.com/Buju77)
[#10920](https://github.com/CocoaPods/CocoaPods/issues/10920)

## 1.5.0 (2021-08-31)

Expand Down
2 changes: 1 addition & 1 deletion lib/cocoapods-downloader/git.rb
Expand Up @@ -52,7 +52,7 @@ def self.preprocess_options(options)
#
def self.commit_from_ls_remote(output, branch_name)
return nil if branch_name.nil?
encoded_branch_name = branch_name.force_encoding(Encoding::ASCII_8BIT)
encoded_branch_name = branch_name.encode(Encoding::ASCII_8BIT)
match = %r{([a-z0-9]*)\trefs\/(heads|tags)\/#{Regexp.quote(encoded_branch_name)}}.match(output)
match[1] unless match.nil?
end
Expand Down

0 comments on commit 6d074bd

Please sign in to comment.