From 08e47ab98a7b205f64ec89d7dcc7c347b55f0dfe Mon Sep 17 00:00:00 2001 From: shyouhei Date: Mon, 29 Oct 2018 02:07:52 +0000 Subject: [PATCH] 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/ruby_vm/models/bare_instructions.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tool/ruby_vm/models/bare_instructions.rb b/tool/ruby_vm/models/bare_instructions.rb index ed3d886014..7d9ed6da5a 100755 --- a/tool/ruby_vm/models/bare_instructions.rb +++ b/tool/ruby_vm/models/bare_instructions.rb @@ -58,7 +58,9 @@ class RubyVM::BareInstructions end def attributes - return @attrs.values + return @attrs \ + . sort_by {|k, _| k } \ + . map {|_, v| v } end def width