mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
RJIT: Simplify how Capstone is used in tests
This commit is contained in:
parent
1c8e69d602
commit
d8344559b2
4 changed files with 9 additions and 19 deletions
|
@ -58,8 +58,8 @@ module RubyVM::RJIT
|
|||
(@mem_block...(@mem_block + @mem_size)).include?(addr)
|
||||
end
|
||||
|
||||
def dump_disasm(from, to, io: STDOUT, color: true)
|
||||
C.dump_disasm(from, to).each do |address, mnemonic, op_str|
|
||||
def dump_disasm(from, to, io: STDOUT, color: true, test: false)
|
||||
C.dump_disasm(from, to, test:).each do |address, mnemonic, op_str|
|
||||
@comments.fetch(address, []).each do |comment|
|
||||
io.puts colorize(" # #{comment}", bold: true, color:)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue