Skip to content

Commit

Permalink
add zero arg ReverseOrdering constructor (#679)
Browse files Browse the repository at this point in the history
  • Loading branch information
oxinabox authored and martinholters committed Nov 18, 2019
1 parent 0e84461 commit 88b9fc0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Compat"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "2.2.0"
version = "3.0.0"

[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,16 @@ Currently, the `@compat` macro supports the following syntaxes:

* `merge` methods with one and `n` `NamedTuple`s ([#29259]). (since Compat 2.0.0)

* `Base.Order.ReverseOrdering` has a zero arg constructor [#33736]. (since Compat 3.0.0)

## Renaming

## New macros

## Other changes

* Function composition now supports multiple functions: `∘(f, g, h) = f ∘ g ∘ h`
and splatting `∘(fs...)` for composing an iterable collection of functions ([#33568]).
and splatting `∘(fs...)` for composing an iterable collection of functions ([#33568]). (since Compat 3.0.0)

## New types

Expand Down Expand Up @@ -114,3 +116,4 @@ Note that you should specify the correct minimum version for `Compat` in the
[#32628]: https://github.com/JuliaLang/julia/issues/32628
[#33129]: https://github.com/JuliaLang/julia/issues/33129
[#33568]: https://github.com/JuliaLang/julia/pull/33568
[#33736]: http://github.com/JuliaLang/julia/pull/33736
5 changes: 5 additions & 0 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ if VERSION < v"1.4.0-DEV.329"
Base.:(f, g, h...) = (f g, h...)
end

# https://github.com/JuliaLang/julia/pull/33736/
if VERSION < v"1.4.0-DEV.493"
Base.Order.ReverseOrdering() = Base.Order.ReverseOrdering(Base.Order.Forward)
end

include("deprecated.jl")

end # module Compat
6 changes: 6 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,10 @@ end
@test (fs...)("ABC") == "AB"
end

# https://github.com/JuliaLang/julia/pull/33736/
@testset "ReverseOrdering constructor" begin
@test Base.Order.ReverseOrdering() == Base.Order.Reverse
end


nothing

2 comments on commit 88b9fc0

@martinholters
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/5534

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v3.0.0 -m "<description of version>" 88b9fc08c6081f2d7e62d5347f4c2cf3be932dd2
git push origin v3.0.0

Please sign in to comment.