program ruby_ap;

{$APPTYPE CONSOLE}

uses SysUtils, Rubies, uAppInit;

begin
asm
  FInit;
end;
  PhiAppInit;
  try
    ruby_run;
  except
    on E: Exception do
      WriteLn(
        ap_sourcefile, ':',
        ap_sourceline, ': in `',
        rb_id2name(rb_frame_last_func), ''': ',
        E.message, ' (', E.ClassName, ')');
  end;
end.
