summaryrefslogtreecommitdiff
path: root/tool/ruby_vm
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-31 05:36:17 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-31 05:36:17 +0000
commit857bbfd02c8c57b99c1f40311c507ca3bc2f16a6 (patch)
treeae54adce61970a4d3e5e8df701bace8901148969 /tool/ruby_vm
parente20714062bf57efcbff0dd3162b148dd35312865 (diff)
_insn_type_chars.erb: use C99
Now that comma at the end of enum is allowed, we can write this much more straight-forward. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/ruby_vm')
-rw-r--r--tool/ruby_vm/views/_insn_type_chars.erb5
1 files changed, 3 insertions, 2 deletions
diff --git a/tool/ruby_vm/views/_insn_type_chars.erb b/tool/ruby_vm/views/_insn_type_chars.erb
index fb0e091241..4e1f63e660 100644
--- a/tool/ruby_vm/views/_insn_type_chars.erb
+++ b/tool/ruby_vm/views/_insn_type_chars.erb
@@ -6,7 +6,8 @@
%# conditions mentioned in the file COPYING are met. Consult the file for
%# details.
%
-% map = RubyVM::Typemap.each_pair.map {|k, (c, t)| sprintf "%s = '%s'", t, c }
enum ruby_insn_type_chars {
- <%= map.join(",\n ") %>
+% RubyVM::Typemap.each_value do |(c, t)|
+ <%= t %> = '<%= c %>',
+% end
};