Skip to content

Commit

Permalink
Deprecate callable regex objects
Browse files Browse the repository at this point in the history
  • Loading branch information
ararslan committed Mar 1, 2018
1 parent dfe015b commit c9fb6fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1452,6 +1452,8 @@ end
link_pipe!(pipe, reader_supports_async = julia_only_read, writer_supports_async = julia_only_write),
false)

@deprecate (r::Regex)(s) isfound(r, s)

# PR 26156
@deprecate trunc(x, digits, base) trunc(x, digits, base = base)
@deprecate floor(x, digits, base) floor(x, digits, base = base)
Expand Down
2 changes: 0 additions & 2 deletions base/regex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ function contains(s::SubString, r::Regex, offset::Integer=0)
r.match_data)
end

(r::Regex)(s) = contains(s, r)

"""
match(r::Regex, s::AbstractString[, idx::Integer[, addopts]])
Expand Down

0 comments on commit c9fb6fb

Please sign in to comment.