Skip to content

Commit

Permalink
Merge pull request #15 from JuliaLang/jcb/string
Browse files Browse the repository at this point in the history
Typealias String after String -> AbstractString rename
  • Loading branch information
jakebolewski committed Nov 4, 2014
2 parents b9fef02 + 91b200b commit f801872
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Compat.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
module Compat

using Base.Meta

if VERSION < v"0.4.0-dev+1387"
typealias AbstractString String
export AbstractString
end

if VERSION < v"0.4.0-dev+980"
macro Dict(pairs...)
esc(Expr(:dict, pairs...))
Expand Down
4 changes: 4 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,7 @@ end
@test @compat split("a,b,,c", ',', limit=2,keep=true) == ["a", "b,,c"]
@test @compat split("a,b,,c", ',', keep=false) == ["a", "b", "c"]
@test @compat split("a,b,,c", ',', keep=true) == ["a", "b", "", "c"]

if VERSION < v"0.4.0-dev+1387"
@test isdefined(Main, :AbstractString)
end

0 comments on commit f801872

Please sign in to comment.