summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-02 00:57:50 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-02 00:57:50 +0000
commit18c40b16d0d4d7b6bb7e0a60c5309b5d3ab5c4df (patch)
tree3200bc35d6dce7cafcbd4967854d69f86b0114b3 /iseq.c
parent8bfc46a117b2956e321f12e6e96a3958a60ac6ed (diff)
tool/ruby_vm/views/_insn_name_info.erb: Auto-detect the longest insn name
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/iseq.c b/iseq.c
index 4748bdde90..74a29a6b85 100644
--- a/iseq.c
+++ b/iseq.c
@@ -1831,7 +1831,8 @@ rb_iseq_disasm_insn(VALUE ret, const VALUE *code, size_t pos,
insn_name_buff = insn_name(insn);
if (1) {
- rb_str_catf(str, "%04"PRIuSIZE" %-28s ", pos, insn_name_buff);
+ extern const int rb_vm_max_insn_name_size;
+ rb_str_catf(str, "%04"PRIuSIZE" %-*s ", pos, rb_vm_max_insn_name_size, insn_name_buff);
}
else {
rb_str_catf(str, "%04"PRIuSIZE" %-28.*s ", pos,