summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-29 02:07:52 (GMT)
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-29 02:07:52 (GMT)
commit08e47ab98a7b205f64ec89d7dcc7c347b55f0dfe (patch)
tree1c3aa8c48283c114df0849cfb35b7a92d46e6ece /tool
parent437dd8815b04b655ba742063297d8db65045a44f (diff)
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')
-rwxr-xr-xtool/ruby_vm/models/bare_instructions.rb4
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 ed3d886..7d9ed6d 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