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

Add StringLiteral#> and StringLiteral#< #2858

Merged
merged 1 commit into from
Jun 16, 2016

Conversation

jhass
Copy link
Member

@jhass jhass commented Jun 16, 2016

Given #2856, then starting with 0.19 (or 0.18.2, depending on whether we want 0.18.x to be compilable with 0.18.0 or 0.17.4 or not) we should be able to do stuff like {% if Crystal::VERSION > "0.19.0" %} with this, which will then patch things in for 0.19.0+x, 0.19.1 etc.

@jhass jhass added this to the 0.18.1 milestone Jun 16, 2016
@jhass
Copy link
Member Author

jhass commented Jun 16, 2016

Derp, wrong target branch, should be merged to release/0.18

@asterite
Copy link
Member

What about ">=" and "<="?

@jhass
Copy link
Member Author

jhass commented Jun 16, 2016

Go ahead :P

@asterite
Copy link
Member

@jhass no worries, we can add those later. Want to recreate the PR and target release/0.18 ?

@jhass
Copy link
Member Author

jhass commented Jun 16, 2016

Nah, I'll just manually merge it into the right branch once CI passes.

@jhass jhass force-pushed the string_literal_compare branch from 4a3b22e to 1779984 Compare June 16, 2016 22:10
@ysbaddaden
Copy link
Contributor

Note that it doesn't naturally compare, so 0.10 will be smaller than 0.2.

@jhass
Copy link
Member Author

jhass commented Jun 16, 2016

Yes, but I think it's good enough for now, we'll only use between two versions in the compiler.

@jhass jhass merged commit 1779984 into crystal-lang:master Jun 16, 2016
jhass added a commit that referenced this pull request Jun 16, 2016
Add StringLiteral#> and StringLiteral#<
@jhass jhass deleted the string_literal_compare branch June 16, 2016 23:58
@ysbaddaden
Copy link
Contributor

I merely outlined that the behavior may not always be correct, especially since it may be used outside of the compiler. Maybe a proper version comparison would be a nice to have in macros?

@jhass
Copy link
Member Author

jhass commented Jun 17, 2016

Sure, would be fine from my side. See #2632 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants