Skip to content

Commit

Permalink
Drop obsolete workaround in Range#reverse_each (#14709)
Browse files Browse the repository at this point in the history
The workaround is no longer needed since Crystal 0.36
  • Loading branch information
yxhuvud authored Jun 15, 2024
1 parent c2dd548 commit 0de7abf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/range.cr
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,15 @@ struct Range(B, E)
yield end_value if !@exclusive && (begin_value.nil? || !(end_value < begin_value))
current = end_value

# TODO: The macro interpolations are a workaround until #9324 is fixed.

{% if B == Nil %}
while true
current = current.pred
{{ "yield current".id }}
yield current
end
{% else %}
while begin_value.nil? || begin_value < current
current = current.pred
{{ "yield current".id }}
yield current
end
{% end %}
end
Expand Down

0 comments on commit 0de7abf

Please sign in to comment.