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 c74d6c233404..449158026de7 100644 --- a/core/src/main/java/org/jruby/internal/runtime/GlobalVariables.java +++ b/core/src/main/java/org/jruby/internal/runtime/GlobalVariables.java @@ -123,10 +123,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();