Skip to content
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

Don't allow ranges to span across lines #7888

Merged
merged 1 commit into from Jul 2, 2019

Conversation

@oprypin
Copy link
Contributor

commented Jun 14, 2019

1..\n2.. was turning into (1..2)..

This is a backwards-incompatible change because 1..\n2 is also no longer parsed as one range.

@oprypin

This comment has been minimized.

Copy link
Contributor Author

commented Jun 14, 2019

Also note:

  • Before:
    (1..
    2) == (1..2)
  • After:
    (1..
    2) == 2

Also also note (regardless of this change):

  • (1+
    2) == 3)
  • (1
    +2) == 2)
Don't allow ranges to span across lines
"1..\n2.." was turning into "(1..2).."

This is a backwards-incompatible change because "1..\n2" is also no longer parsed as one range.

@oprypin oprypin force-pushed the oprypin:fuzz2 branch from 39961df to cc672de Jun 14, 2019

@RX14

RX14 approved these changes Jun 24, 2019

@sdogruyol
Copy link
Member

left a comment

Thank you @oprypin 🙏

@sdogruyol sdogruyol requested a review from bcardiff Jul 2, 2019

@bcardiff
Copy link
Member

left a comment

I wasn't aware of the quirk.

(1
+2) == 2

That is something to have in mind for later.

This change looks good.

@bcardiff bcardiff added this to the 0.30.0 milestone Jul 2, 2019

@bcardiff bcardiff merged commit 1c33144 into crystal-lang:master Jul 2, 2019

5 checks passed

ci/circleci: check_format Your tests passed on CircleCI!
Details
ci/circleci: test_darwin Your tests passed on CircleCI!
Details
ci/circleci: test_linux Your tests passed on CircleCI!
Details
ci/circleci: test_linux32 Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.