Skip to content

Commit

Permalink
Fix #107
Browse files Browse the repository at this point in the history
  • Loading branch information
simonster committed Jul 1, 2015
1 parent 3bbd953 commit be55b83
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ Currently, the `@compat` macro supports the following syntaxes:
Compat provides an unexported `Compat.unsafe_convert` method that is aliased to `Base.convert` on Julia 0.3 and
`Base.unsafe_convert` on Julia 0.4.

* `gc_enable()` is now `gc_enable(true)` and `gc_disable()` is now `gc_enable(false)` [#11647](https://github.com/JuliaLang/julia/pull/11647)

## New macros

* `@inline` and `@noinline` have been added. On 0.3, these are "no-ops," meaning they don't actually do anything.
Expand Down
4 changes: 4 additions & 0 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -467,4 +467,8 @@ else
import Base.@irrational
end

if VERSION < v"0.4.0-dev+5305"
Base.gc_enable(on::Bool) = on ? gc_enable() : gc_disable()
end

end # module
4 changes: 4 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -363,3 +363,7 @@ f(::Irrational) = true
@test f(π)
Compat.@irrational mathconst_one 1.0 big(1.)
@test f(mathconst_one)

# gc_enable(::Bool)
gc_enable(false)
gc_enable(true)

0 comments on commit be55b83

Please sign in to comment.