Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 219bc78f4823
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5799d9607d0c
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Mar 23, 2018

  1. Fix RubyString instances to raise FrozenError exceptions when mutatio…

    …ns are attempted in debug mode
    
    It was working OK in normal mode but not in debug mode.
    nomadium committed Mar 23, 2018
    Copy the full SHA
    fdbc404 View commit details
  2. Merge pull request #5106 from nomadium/fix-string-tests-with-frozen-e…

    …rror-related-failures
    
    Fix RubyString instances to raise FrozenError exceptions when mutations are attempted in debug mode…
    enebo authored Mar 23, 2018
    Copy the full SHA
    5799d96 View commit details
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/src/main/java/org/jruby/RubyString.java
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyString.java
Original file line number Diff line number Diff line change
@@ -909,7 +909,7 @@ private void frozenCheck(boolean runtimeError) {
if (obj != null && obj instanceof RubyArray) {
RubyArray info = (RubyArray) obj;
if (info.getLength() == 2) {
throw getRuntime().newRaiseException(getRuntime().getRuntimeError(),
throw getRuntime().newRaiseException(getRuntime().getFrozenError(),
"can't modify frozen String, created at " + info.eltInternal(0) + ":" + info.eltInternal(1));
}
}