diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-29 02:07:52 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-29 02:07:52 +0000 |
commit | 08e47ab98a7b205f64ec89d7dcc7c347b55f0dfe (patch) | |
tree | 1c3aa8c48283c114df0849cfb35b7a92d46e6ece /tool/ruby_vm/models | |
parent | 437dd8815b04b655ba742063297d8db65045a44f (diff) | |
download | ruby-08e47ab98a7b205f64ec89d7dcc7c347b55f0dfe.tar.gz |
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
Diffstat (limited to 'tool/ruby_vm/models')
-rwxr-xr-x | tool/ruby_vm/models/bare_instructions.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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 |