Skip to content

Instantly share code, notes, and snippets.

@rondale-sc
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rondale-sc/8817409 to your computer and use it in GitHub Desktop.
Save rondale-sc/8817409 to your computer and use it in GitHub Desktop.
/* show each line */
for (n = 0; n < size;) {
n += rb_iseq_disasm_insn(str, iseq, n, iseqdat, child);
}
/* excerpt from rb_iseq_disasm_isn() */
if (1) {
rb_str_catf(str, "%04"PRIdSIZE" %-16s ", pos, insn_name_buff);
}
else {
rb_str_catf(str, "%04"PRIdSIZE" %-16.*s ", pos,
(int)strcspn(insn_name_buff, "_"), insn_name_buff);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment