-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Update Ruby to 3.0.2 #48
Conversation
Either json 2.6.1 or File.write seems to append an additional \n at the end of the parsed results.json. Thus, both assertion argument need to be treated the same now.
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.
Thanks for working on this!
It might be worth adding a fixture to https://github.com/exercism/ruby-test-runner/tree/main/test/fixtures that verifies that Ruby 3.0.2 syntax can be used successfully in an exercise.
Good idea! That's indeed what got me started 😤😄 :
should not appear for def method_name = … I'll start with that or similar, but would also look into adding the "Other Notable New Features" from the release post. |
37ea9df
to
75a0a8f
Compare
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.
Great! @iHiD care to take a look?
.github/workflows/rubocop.yml
Outdated
@@ -14,9 +14,9 @@ jobs: | |||
- uses: actions/checkout@v2 | |||
|
|||
- name: Set up Ruby | |||
uses: ruby/setup-ruby@e27aee156d42e38ff8a4c2fc97b125c4087cbcc7 | |||
uses: ruby/setup-ruby@b00551441a6fa3d528f3443dbff264a934b6e316 |
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.
There was another release in the meantime, which reminded me that I generally wanted to ask:
- why the sha is pinned?
- whether there are specific criteria, which version to pin?
Just out of curiosity, though. Not a blocker to the functionality of this PR.
I guess we could also do
uses: ruby/setup-ruby@b00551441a6fa3d528f3443dbff264a934b6e316 | |
uses: ruby/setup-ruby@v1.85.0 |
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.
- Sha is pinned because the "version" is based on a tag, which could be maliciously retagged in the future. Because actions effectively have write access to the codebase, if someone later got access to the setup-ruby repo and pushed and retagged their bad push as 1.85.0 then we'd be in trouble.
- The latest sha is generally fine :)
I'll release a new (non-beta) mandate and then we can make that final change and merge. I'm away from my laptop for most of the day, but will try and get this done later or tomorrow. Thanks! :) |
See https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/, but excluding: - "in is changed …" because that's behaviour - "Find pattern …" because it's "experimental" - "Hash#except …" because the test runner doesn't care from where the student's code loads this method.
75a0a8f
to
0e8e7ce
Compare
Awesome. Let's do it! Thanks :) |
Awesome. Great news. Thank you so much!! |
Thanks to @iHiD's advice in #41, I think this resolves #40 in a more complete way (and also replaces the botched attempt #47):
ruby…
version numbers.mandate
, as advised & releasedjson
, to resolveArgumentError: wrong number of arguments (given 2, expected 1)
inTestRunnerTest#…
parser
, to stopwarning: parser/current is loading parser/ruby27, which recognizes 2.7.x-compliant syntax, but you are running 3.0.2.
I confirmed locally that these succeed:
docker build .
bundle exec rake test
=>13 runs, 23 assertions, 0 failures, 0 errors, 0 skips
--job rubocop && act --job test