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

fix #36116, diff(::AbstractRange) returns an Array #36117

Merged
merged 3 commits into from
Jun 3, 2020
Merged

Conversation

mbauman
Copy link
Member

@mbauman mbauman commented Jun 2, 2020

It's oh so tempting to simply define diff(r::AbstractRange) = fill(step(r), length(r)-1), (or even a Fill), but this preserves the behavior that we had on 1.4 and before — and is arguably what folks want. It's not the repeated theoretical step, but the realized sequential differences of the generated elements.

@mbauman mbauman added bugfix This change fixes an existing bug backport 1.5 labels Jun 2, 2020
base/multidimensional.jl Outdated Show resolved Hide resolved
base/multidimensional.jl Outdated Show resolved Hide resolved
test/ranges.jl Show resolved Hide resolved
@KristofferC KristofferC merged commit b49a0d5 into master Jun 3, 2020
@KristofferC KristofferC deleted the mb/36116 branch June 3, 2020 13:08
KristofferC pushed a commit that referenced this pull request Jun 4, 2020
* fix #36116, diff(::AbstractRange) returns an Array

(cherry picked from commit b49a0d5)
simeonschaub pushed a commit to simeonschaub/julia that referenced this pull request Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants