Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace() error string replace #742

Closed
natew opened this issue Apr 20, 2012 · 7 comments
Closed

replace() error string replace #742

natew opened this issue Apr 20, 2012 · 7 comments
Assignees
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@natew
Copy link

natew commented Apr 20, 2012

julia> replace("String", "tr", "-")
no method split(ASCIIString,Regex,Bool,Int64)
 in method_missing at base.jl:60
 in replace at regex.jl:135
@pao
Copy link
Member

pao commented Apr 20, 2012

Goes bad at caf5d20.

Bisecting: 4 revisions left to test after this (roughly 2 steps)
[caf5d20e935f34d4d362ffcc4b65445e26f5acbf] Generic split implementation based on the search function.
patrick@lubuntu-vm:~/julia$ make -j6 && ./julia -e "replace(\"String\", \"tr\", \"-\")"
    JULIA sys.ji
no method split(ASCIIString,Regex,Bool,Int64)
 in method_missing at base.jl:60
 in replace at regex.jl:135
 in process_options at client.jl:142
 in _start at client.jl:213
patrick@lubuntu-vm:~/julia$ git bisect bad
Bisecting: 1 revision left to test after this (roughly 1 step)
[208642cec0ccf90ec199b9d7bf3b3cb5557e05d2] Implement the string search interface with regexes.
patrick@lubuntu-vm:~/julia$ make -j6 && ./julia -e "replace(\"String\", \"tr\", \"-\")"
    JULIA sys.ji
patrick@lubuntu-vm:~/julia$ git bisect good
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[bfd1be634c7e695dc57e90aa23c5ee0dc1b3afdd] Fix subtle bug in substring search implementation.
patrick@lubuntu-vm:~/julia$ make -j6 && ./julia -e "replace(\"String\", \"tr\", \"-\")"
    JULIA sys.ji
patrick@lubuntu-vm:~/julia$ git bisect good
caf5d20e935f34d4d362ffcc4b65445e26f5acbf is the first bad commit
commit caf5d20e935f34d4d362ffcc4b65445e26f5acbf
Author: Stefan Karpinski <[email protected]>
Date:   Mon Apr 16 00:42:08 2012 -0400

    Generic split implementation based on the search function.

    There's one functionality regression here which is loss of the
    limit argument that regex split supported. It doesn't look as
    though anyone is using it right now though. Will add it back.

@pao
Copy link
Member

pao commented Apr 20, 2012

Should have cc'd @StefanKarpinski.

@ghost ghost assigned StefanKarpinski Apr 20, 2012
@StefanKarpinski
Copy link
Member

Ok, on it. The thing to do at this point is to rewrite replace generically like I did with split.

@pao
Copy link
Member

pao commented Apr 20, 2012

Sounds like a plan. The webserver and strpack both broke on this one.

@StefanKarpinski
Copy link
Member

Yikes. Sorry. Will also add tests so that doesn't happen again.

@pao
Copy link
Member

pao commented Apr 20, 2012

No worries, I just found out strpack was affected when updating to the LRU cache and running the test (of sorts) in examples/png.jl. Confused me for a bit due to the lack of useful backtraces on macro expansion.

@pao
Copy link
Member

pao commented Apr 20, 2012

Thanks!

KristofferC pushed a commit that referenced this issue Sep 18, 2018
(cherry picked from commit ac84b7fcf6b3b18fb02e2c79f7e204d598ee860a)
(cherry picked from commit 854cf42190f1be2cd7036539a76dfbb555cfa7f5)
KristofferC pushed a commit that referenced this issue Sep 19, 2018
(cherry picked from commit ac84b7fcf6b3b18fb02e2c79f7e204d598ee860a)
(cherry picked from commit 854cf42190f1be2cd7036539a76dfbb555cfa7f5)
(cherry picked from commit 794c1f1)
KristofferC pushed a commit that referenced this issue Feb 11, 2019
(cherry picked from commit ac84b7fcf6b3b18fb02e2c79f7e204d598ee860a)
(cherry picked from commit 854cf42190f1be2cd7036539a76dfbb555cfa7f5)
(cherry picked from commit 794c1f1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants