ruby-changes:53210
From: shyouhei <ko1@a...>
Date: Mon, 29 Oct 2018 11:07:57 +0900 (JST)
Subject: [ruby-changes:53210] shyouhei:r65425 (trunk): bare_instructions.rb: sort attributes [ci skip]
shyouhei 2018-10-29 11:07:52 +0900 (Mon, 29 Oct 2018) New Revision: 65425 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65425 Log: bare_instructions.rb: sort attributes [ci skip] This enhances stability of the generated source code (namely insns_info.inc) across attribute insertion / deletion. It does not change the compiled binary at all; just a bit of readability. Modified files: trunk/tool/ruby_vm/models/bare_instructions.rb Index: tool/ruby_vm/models/bare_instructions.rb =================================================================== --- tool/ruby_vm/models/bare_instructions.rb (revision 65424) +++ tool/ruby_vm/models/bare_instructions.rb (revision 65425) @@ -58,7 +58,9 @@ class RubyVM::BareInstructions https://github.com/ruby/ruby/blob/trunk/tool/ruby_vm/models/bare_instructions.rb#L58 end def attributes - return @attrs.values + return @attrs \ + . sort_by {|k, _| k } \ + . map {|_, v| v } end def width -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/