ruby-changes:49625
From: shyouhei <ko1@a...>
Date: Tue, 9 Jan 2018 23:25:34 +0900 (JST)
Subject: [ruby-changes:49625] shyouhei:r61734 (trunk): comma at the end of enum is a C99ism.
shyouhei 2018-01-09 22:30:33 +0900 (Tue, 09 Jan 2018) New Revision: 61734 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61734 Log: comma at the end of enum is a C99ism. Modified files: trunk/tool/ruby_vm/views/_insn_type_chars.erb Index: tool/ruby_vm/views/_insn_type_chars.erb =================================================================== --- tool/ruby_vm/views/_insn_type_chars.erb (revision 61733) +++ tool/ruby_vm/views/_insn_type_chars.erb (revision 61734) @@ -5,8 +5,8 @@ https://github.com/ruby/ruby/blob/trunk/tool/ruby_vm/views/_insn_type_chars.erb#L5 %# granted, to either redistribute and/or modify this file, provided that the %# 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 { -% RubyVM::Typemap.each_pair do |k, (c, t)| - <%= t %> = '<%= c %>', -% end + <%= map.join(",\n ") %> }; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/