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
Call to_s on site.url before attempting to concatenate strings #6253
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rubocop thinks the line is too long.
Otherwise LGTM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test?
In Also a quick fmt error. 😸 |
Also adds tests
Added 2 tests: one for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jekyllbot: merge +fix |
Merge pull request 6253 in 3.5-stable branch
We call
to_s
before we callsite.baseurl
, but we don't callto_s
before we callsite.url
, meaning ifsite.url
is something other than a string, things blow up.The specific use case for the
to_s
here, other than users that seturl
to something else, is the ability to stubsite.url
with a Proc that would lazily calculate the URL when called.