MARKER |
= |
"!XMP#{Time.new.to_i}_#{Process.pid}_#{rand(1000000)}!" |
XMP_RE |
= |
Regexp.new("^" + Regexp.escape(MARKER) + '\[([0-9]+)\] (=>|~>|==>) (.*)') |
VAR |
= |
"_xmp_#{Time.new.to_i}_#{Process.pid}_#{rand(1000000)}" |
WARNING_RE |
= |
/.*:([0-9]+): warning: (.*)/ |
RuntimeData |
= |
Struct.new(:results, :exceptions, :bindings) |
INITIALIZE_OPTS |
= |
{:interpreter => "ruby", :options => [], :libs => [], :include_paths => [], :warnings => true, :use_parentheses => true} |
Interpreter |
= |
Struct.new(:options, :execute_method, :accept_debug, :accept_include_paths, :chdir_proc) |
INTERPRETER_RUBY |
= |
Interpreter.new(["-w"], :execute_ruby, true, true, nil) |
INTERPRETER_RBTEST |
= |
Interpreter.new(["-S", "rbtest"], :execute_script, false, false, nil) |
INTERPRETER_FORK |
= |
Interpreter.new(["-S", "rct-fork-client"], :execute_tmpfile, false, true, lambda { Fork::chdir_fork_directory }) |
SINGLE_LINE_RE |
= |
/^(?!(?:\s+|(?:\s*#.+)?)# ?=>)(.*) # ?=>.*/ |
MULTI_LINE_RE |
= |
/^(.*)\n(( *)# ?=>.*(?:\n|\z))(?: *# .*\n)*/ |