Navigation Menu

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

Use #prepend rather than using 2 aliases #19752

Merged

Conversation

yuki24
Copy link
Contributor

@yuki24 yuki24 commented Apr 14, 2015

This is a follow-up pull request to #19434. Now that Ruby 2.2.2 is out and we can use #prepend anywhere.

cc/ @rafaelfranca @kirs

yuki24 added a commit to yuki24/rails that referenced this pull request Apr 14, 2015
This is required to run rails#19752 successfully.
@yuki24 yuki24 force-pushed the use-prepend-rather-than-alias branch 2 times, most recently from 783acaf to 93078ca Compare April 14, 2015 04:15
@yuki24
Copy link
Contributor Author

yuki24 commented Apr 14, 2015

For some reason the build status didn't show up here, but it's green ✅ on travis.

@kirs
Copy link
Member

kirs commented Apr 14, 2015

Nice catch! Looks good for me.

else
include_without_range?(value)
module ActiveSupport
module IncludeWithRange

Choose a reason for hiding this comment

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

I think we should nodoc this constant as well, it will be weird to have it showing up in the docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@yuki24 yuki24 force-pushed the use-prepend-rather-than-alias branch from 93078ca to aa255a3 Compare April 14, 2015 12:26
if value.is_a?(::Range)
# 1...10 includes 1..9 but it does not include 1..10.
operator = exclude_end? && !value.exclude_end? ? :< : :<=
super(value.first) && value.last.send(operator, last)

Choose a reason for hiding this comment

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

Sorry, I just noticed it now, but this indent seems weird doesn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure, I'm happy to remove the line break here, though. WDYT?

Choose a reason for hiding this comment

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

The second line has extra indent, I think it should be indented like this:

        operator = exclude_end? && !value.exclude_end? ? :< : :<=
        super(value.first) && value.last.send(operator, last)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I missed that. the commit has been updated.

@morgoth morgoth mentioned this pull request Apr 14, 2015
@yuki24 yuki24 force-pushed the use-prepend-rather-than-alias branch from aa255a3 to d3684c4 Compare April 14, 2015 17:13
@rafaelfranca
Copy link
Member

@carlosantoniodasilva :shipit:

carlosantoniodasilva added a commit that referenced this pull request Apr 14, 2015
Use #prepend rather than using 2 aliases
@carlosantoniodasilva carlosantoniodasilva merged commit fcd8e62 into rails:master Apr 14, 2015
@carlosantoniodasilva
Copy link
Member

thanks! 💚💛❤️💙💜

@yuki24 yuki24 deleted the use-prepend-rather-than-alias branch April 14, 2015 17:19
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.

None yet

8 participants