Skip to content

Commit

Permalink
Revert "Raise FrozenError here too."
Browse files Browse the repository at this point in the history
This reverts commit cea8241.
headius committed Feb 24, 2018

Verified

This commit was signed with the committer’s verified signature.
headius Charles Oliver Nutter
1 parent c843e1f commit 1012517
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/main/java/org/jruby/RubyString.java
Original file line number Diff line number Diff line change
@@ -909,7 +909,8 @@ private void frozenCheck(boolean runtimeError) {
if (obj != null && obj instanceof RubyArray) {
RubyArray info = (RubyArray) obj;
if (info.getLength() == 2) {
throw getRuntime().newFrozenError("can't modify frozen String, created at " + info.eltInternal(0) + ":" + info.eltInternal(1));
throw getRuntime().newRaiseException(getRuntime().getRuntimeError(),
"can't modify frozen String, created at " + info.eltInternal(0) + ":" + info.eltInternal(1));
}
}
}

0 comments on commit 1012517

Please sign in to comment.