-
-
Notifications
You must be signed in to change notification settings - Fork 329
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
Parser 3.0: methods #2151
Parser 3.0: methods #2151
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.
Great work! ✨
Just a question, and the request to squash the rubocop fixes to the original commits.
9f9a45a
to
367fb85
Compare
I will need to do a little bit of more work on this. But it seems good enough, of 700 fails added by a version change, this changeset removes 100 of them. |
@hmdne I'm always ok with splitting if you want to have the part of this that's already ok merged right away |
367fb85
to
2d6312e
Compare
@elia If you see a problem to happen since some commit, we can split until that commit. What do you think about the new approach to the #clamp? I basically ported this: https://github.com/ruby/ruby/blob/master/compar.c#L222-L252 (but to Javascript this time) and I found out that the entire module can be simplified. |
By the way, this force-push is only changed from f1c0c4f onwards (not counting the squashes). |
On par with Ruby 2.7. This commit rewrites Comparable#clamp to be as close to MRI's cmp_clamp as defined in compar.c. Additionally, there's a refactor done on comparable.rb to simplify it and improve its performance.
2d6312e
to
4836fed
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 work!
(I refined a bit the commits so that each fixed spec is enabled along with the fix)
Itself not related to the parser, but implements a few methods that were added between Ruby 2.6 and 3.0.