public static void CheckConstantName(string name) { if (!Tokenizer.IsConstantName(name)) { throw RubyExceptions.CreateNameError(String.Format("`{0}' is not allowed as a constant name", name)); } }
public static void CheckInstanceVariableName(string name) { if (!Tokenizer.IsInstanceVariableName(name)) { throw RubyExceptions.CreateNameError(String.Format("`{0}' is not allowed as an instance variable name", name)); } }
internal Exception /*!*/ ReadOnlyError(string /*!*/ name) { return(RubyExceptions.CreateNameError(String.Format("${0} is a read-only variable", name))); }
public static Exception /*!*/ CreateUndefinedMethodError(RubyModule /*!*/ module, string /*!*/ methodName) { return(RubyExceptions.CreateNameError(String.Format("undefined method `{0}' for {2} `{1}'", methodName, module.Name, module.IsClass ? "class" : "module"))); }