1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Update yjit.rb

This commit is contained in:
Maxime Chevalier-Boisvert 2021-07-15 14:57:27 -04:00 committed by Alan Wu
parent 84920fe8ee
commit 1943b27fe9

View file

@ -103,7 +103,7 @@ module YJIT
def self.disasm_block(cs, block, highlight)
comments = comments_for(block.address, block.address + block.code.length)
comment_idx = 0
str = ''.dup
str = +''
cs.disasm(block.code, block.address).each do |i|
while (comment = comments[comment_idx]) && comment.address <= i.address
str << " ; #{highlight.call(comment.comment)}\n"