forked from clio/ten_years_rails
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Support Ruby >= 2.0.0 #54
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d6973f3
to
aaa76f5
Compare
hello @aisayo! welcome to your first OSS request for review! whenever you have a moment, could you review this PR (you can log it under the thanks! |
ping @aisayo 😃 |
bronzdoc
reviewed
Jul 20, 2022
@arielj can you rebase the changelog |
aisayo
approved these changes
Jul 20, 2022
cleicar
approved these changes
Aug 10, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for older Ruby 2 versions.
Things I changed:
rexml
version, newer versions use implicit default values for keywords arguments (related to the previous change)<<-
heredoc syntax instead of<<~
, the~
version didn't exist in older rubies (since what it does is remove the indentation, I removed the indentation in the code instead)Object.extend
ifObject.prepend
is not a valid method, it was added in Ruby 2.1.10 https://apidock.com/ruby/v2_1_10/Module/prependArray#to_h
, since that method was added in Ruby 2.1.10 https://apidock.com/ruby/v2_1_10/Array/to_hI tried to add support for ruby 1.9.3 but it requires rewriting methods because the ruby2 keyword arguments syntax is not valid. Adding this for reference https://bugs.ruby-lang.org/issues/7664