Skip to content

Commit

Permalink
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/Ruby.java
Original file line number Diff line number Diff line change
@@ -4120,8 +4120,8 @@ public RaiseException newFrozenError(String objectType) {
return newFrozenError(objectType, false);
}

public RaiseException newFrozenError(RubyString type) {
return newRaiseException(getRuntimeError(), str(this, "can't modify frozen ", ids(this, type)));
public RaiseException newFrozenError(RubyModule type) {
return newRaiseException(getFrozenError(), str(this, "can't modify frozen ", types(this, type)));
}

public RaiseException newFrozenError(String objectType, boolean runtimeError) {
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyBasicObject.java
Original file line number Diff line number Diff line change
@@ -1653,7 +1653,7 @@ private void raiseFrozenError() throws RaiseException {
if (this instanceof RubyModule) {
throw getRuntime().newFrozenError("class/module ");
} else {
throw getRuntime().newFrozenError(getMetaClass().toRubyString(getRuntime().getCurrentContext()));
throw getRuntime().newFrozenError(getMetaClass());
}
}

0 comments on commit 90113f4

Please sign in to comment.