Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: frozen string literal issue for ruby 3.4.0 #137

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/ruby_http_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ def build_args(args)
# - The final url string
#
def build_url(query_params: nil)
url = [add_version(''), *@url_path].join('/')
url = build_query_params(url, query_params) if query_params
url = [add_version(+''), *@url_path].join('/')
url = build_query_params(+url, query_params) if query_params

Choose a reason for hiding this comment

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

I don't think this url is frozen because it is not “string literal” 🤔

Suggested change
url = build_query_params(+url, query_params) if query_params
url = build_query_params(url, query_params) if query_params

Copy link
Author

Choose a reason for hiding this comment

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

It is. The line before does a join('/')

So it creates a string literal

Choose a reason for hiding this comment

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

@childish-sambino, @rakatyal, @garethpaul, @tmimura39. Sorry to bother you but could look at this one?

URI.parse("#{@host}#{url}")
end

Expand Down
Loading