Today I Learned

hashrocket A Hashrocket project

You don't need those traces!

Josh looked at disassembling ruby recently.

It outputs code like:

0000 trace            1                                               (   1)
0002 putobject_OP_INT2FIX_O_1_C_
0003 dup
0004 setlocal_OP__WC__0 2
0006 leave

The first instruction trace tells ruby to emit a trace event (trace system detailed here).

The trace instructions may not be useful when examining disassembled code and as such you can compile the code without the trace instructions.

RubyVM::InstructionSequence.compile_option = {
  trace_instruction: false
See More #ruby TILs
Looking for help? Each developer at Hashrocket has years of experience working with Ruby applications of all types and sizes. We're an active presence at Ruby conferences, have written some of the most popular gems, and have worked on many of the web's Ruby on Rails success stories. Contact us today to talk about your Ruby project.