-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
WIP/POC: Remove exclusive range syntax #4219
Conversation
…emove_exclusive_range_syntax
…emove_exclusive_range_syntax
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
@@ -273,7 +273,7 @@ describe "Array" do | |||
a.should eq([1, 2, 6, 5]) | |||
|
|||
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?
@@ -291,16 +225,12 @@ describe "Range" do | |||
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
@@ -291,16 +225,12 @@ describe "Range" do | |||
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
@@ -291,16 +225,12 @@ describe "Range" do | |||
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
@@ -291,16 +225,12 @@ describe "Range" do | |||
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
@@ -291,16 +225,12 @@ describe "Range" do | |||
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
@@ -291,16 +225,12 @@ describe "Range" do | |||
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
iter.rewind | ||
iter.next.should eq(1) | ||
end | ||
|
||
it "is empty with .. and begin > end" do | ||
(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