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

replace all instances of "ends_with?" with "end_with?" #15745

Merged
merged 1 commit into from
Feb 19, 2021

Conversation

jtracey
Copy link
Contributor

@jtracey jtracey commented Feb 16, 2021

The ends_with? method is just a Rails alias of Ruby's end_with? method. Using the latter makes the code less brittle.

This is a follow up to #15741 (and #15739), since I don't think the Rack monkey patch should work with ends_with?? I haven't tested this PR either, but it should be pretty safe, given the above links.
Edit to add: To be clear, I have tested that ends_with? and end_with? do the same thing in the rails app and tests I have lying around, I just haven't tested Mastodon specifically.

The "ends_with?" method is just a Rails alias of Ruby's "end_with?" method.
Using the latter makes the code less brittle.
@Gargron Gargron merged commit c9e8e17 into mastodon:main Feb 19, 2021
dr-bonez pushed a commit to Start9Labs/mastodon that referenced this pull request Mar 1, 2021
The "ends_with?" method is just a Rails alias of Ruby's "end_with?" method.
Using the latter makes the code less brittle.
chrisguida pushed a commit to Start9Labs/mastodon that referenced this pull request Feb 26, 2022
The "ends_with?" method is just a Rails alias of Ruby's "end_with?" method.
Using the latter makes the code less brittle.
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.

3 participants