Next: del_method
Prev: children
compile(code, name)This function compiles the list of strings code and uses the result as the definition of the method named by the symbol name. If there were errors in compiling code, then
compile()
returns a list of strings describing the errors; otherwise
compile() returns an empty list.Examples:
compile(["echo(\"foo\");"], 'foo)
=> []
compile(["echo(\"foo\")"], 'foo)
=> ["Line 2: parse error"]