-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
WIP/POC: Remove exclusive range syntax #4219
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
WIP/POC: Remove exclusive range syntax #4219
Conversation
…emove_exclusive_range_syntax
…emove_exclusive_range_syntax
bew
left a comment
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.
Still some ... Missing, mostly in tests description
|
|
||
| a = [1, 2, 3, 4, 5] | ||
| a[1...1] = 6 | ||
| a[1..0] = 6 |
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.
Are you sure about the 1..0 here?
| (1..0).reverse_each.to_a.empty?.should be_true | ||
| end | ||
|
|
||
| it "is empty with ... and begin > end" do |
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.
You should simply remove the test
| (1..0).reverse_each.to_a.empty?.should be_true | ||
| end | ||
|
|
||
| it "is empty with ... and begin > end" do |
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.
change the test name
| (1..0).reverse_each.to_a.empty?.should be_true | ||
| end | ||
|
|
||
| it "is empty with ... and begin > end" do |
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.
... In test name
| (1..0).reverse_each.to_a.empty?.should be_true | ||
| end | ||
|
|
||
| it "is empty with ... and begin > end" do |
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.
... In test name
| (1..0).reverse_each.to_a.empty?.should be_true | ||
| end | ||
|
|
||
| it "is empty with ... and begin > end" do |
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.
... In test name
| (1..0).reverse_each.to_a.empty?.should be_true | ||
| end | ||
|
|
||
| it "is empty with ... and begin > end" do |
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.
... In test name
| (1..0).step(1).to_a.empty?.should be_true | ||
| end | ||
|
|
||
| it "is empty with ... and begin > end" do |
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.
... In test name
|
Closing to stop spamming the PR queue with this WIP. |
Expendable proof of concept for removing exclusive ranges (...) from the language.
Discussed in #4214