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 raw_ssl_request method for ruby 3.2.0 #127

Merged
merged 2 commits into from
Mar 23, 2023

Conversation

krzysztofbialek
Copy link
Contributor

@krzysztofbialek krzysztofbialek commented Mar 22, 2023

With ruby 3.2.0 upgrade depracated method for calling =~ on Object was removed as described here: https://bugs.ruby-lang.org/issues/15231

This causes:
logger.warn "#{self.class} posting to plaintext endpoint, which is insecure" if logger unless endpoint =~ /^https:/ to throw an error.

Casting endpoint to String explicitly before the match solves the issue.

@krzysztofbialek krzysztofbialek force-pushed the ruby-3-2-1-posts-data-fix branch from ada08a0 to aafbbfe Compare March 22, 2023 09:03
With ruby 3.2.1 upgrade depracated method for calling =~ on Object was removed
https://bugs.ruby-lang.org/issues/15231

This causes
`logger.warn "#{self.class} posting to plaintext endpoint, which is insecure" if logger unless endpoint =~ /^https:/` to throw an error.

Casting endpoint to string resolves this problem as all objects for handling uri
should respond to `to_s` method
@krzysztofbialek krzysztofbialek force-pushed the ruby-3-2-1-posts-data-fix branch from aafbbfe to 75380e1 Compare March 22, 2023 09:15
@krzysztofbialek krzysztofbialek merged commit c5ad433 into master Mar 23, 2023
@krzysztofbialek krzysztofbialek changed the title fix raw_ssl_request method for ruby 3.2.1 fix raw_ssl_request method for ruby 3.2.0 Apr 4, 2023
@shopify-shipit shopify-shipit bot temporarily deployed to rubygems April 4, 2023 16:46 Inactive
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.

2 participants