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

Ruby 2.5: Add String#delete_prefix and String#delete_prefix! #4993

merged 2 commits into from Jan 25, 2018


Copy link

@ChrisBr ChrisBr commented Jan 20, 2018

Copy link
Contributor Author

ChrisBr commented Jan 20, 2018

Please note that the last test in test_delete_prefix! currently fails:

    s = S("ax")
    o =
    def o.to_str
    assert_raise_with_message(RuntimeError, /frozen/) {s.delete_prefix!(o)}

I'm wondering what I do wrong here as I do a frozen check in delete_prefix!
cc @enebo @headius

Copy link
Contributor Author

ChrisBr commented Jan 25, 2018

@enebo @headius fixed the failing test. The problem was that the modify_check() was called before the freeze call was executed. I moved the modifyCheck() now one line down which fixed it.

@enebo enebo added this to the JRuby milestone Jan 25, 2018
@enebo enebo merged commit a9b3836 into jruby:ruby-2.5 Jan 25, 2018
@enebo enebo modified the milestones: JRuby, JRuby Apr 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants