RubyInstanceConfig config = new RubyInstanceConfig();
config.processArguments(new String[]{"--debug"});
Ruby rt = JavaEmbedUtils.initialize(Collections.emptyList(), config);
NativeTracer tracer = new NativeTracer();
rt.addEventHook(tracer);
RubyRuntimeAdapter evaler = JavaEmbedUtils.newRuntimeAdapter();
evaler.eval(rt, "sleep 0.01\nsleep 0.01\nsleep 0.01");
assertEquals("expected tracing", Arrays.asList(1,1,1,2,2,2,3,3,3), tracer.lines);
}