1 30 package org.jruby.runtime; 31 32 import org.jruby.Ruby; 33 import org.jruby.runtime.builtin.IRubyObject; 34 35 public class ReadonlyGlobalVariable extends GlobalVariable { 36 37 public ReadonlyGlobalVariable(Ruby runtime, String name, IRubyObject value) { 38 super(runtime, name, value); 39 } 40 41 public IRubyObject set(IRubyObject value) { 42 throw runtime.newNameError(name() + " is a read-only variable", name()); 43 } 44 } 45 | Popular Tags |