Skip to content

Commit

Permalink
Regexes are immutable: copy(r::Regex) = r [closes #899].
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKarpinski committed May 30, 2012
1 parent 6879f19 commit a4d1e67
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions base/regex.jl
Expand Up @@ -22,6 +22,8 @@ Regex(p::String, s::Bool) = Regex(p, 0, s)
Regex(p::String, o::Integer) = Regex(p, o, false)
Regex(p::String) = Regex(p, 0, false)

copy(r::Regex) = r

# TODO: make sure thing are escaped in a way PCRE
# likes so that Julia all the Julia string quoting
# constructs are correctly handled.
Expand Down

0 comments on commit a4d1e67

Please sign in to comment.