diff --git a/core/src/main/java/org/jruby/internal/runtime/GlobalVariables.java b/core/src/main/java/org/jruby/internal/runtime/GlobalVariables.java index 441e8784d26..ee4d5f5fc14 100644 --- a/core/src/main/java/org/jruby/internal/runtime/GlobalVariables.java +++ b/core/src/main/java/org/jruby/internal/runtime/GlobalVariables.java @@ -122,10 +122,7 @@ public GlobalVariable getVariable(String name) { } public IRubyObject set(String name, IRubyObject value) { - assert name != null; - assert name.startsWith("$"); - - GlobalVariable variable = createIfNotDefined(name); + GlobalVariable variable = getVariable(name); IRubyObject result = variable.getAccessor().setValue(value); variable.trace(value); variable.invalidate();