From e1c19dee802b69c507ace0cd5570daa674f53a4f Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Sat, 18 Jul 2015 12:15:07 +0300 Subject: [PATCH] remove old to_asm very strange that is was called in 1.9 but not 2.0 2.0 seems to delay interpolating strings --- lib/arm/instructions/call_instruction.rb | 2 +- lib/arm/instructions/compare_instruction.rb | 2 +- lib/arm/instructions/stack_instruction.rb | 2 +- test/arm/arm-helper.rb | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/arm/instructions/call_instruction.rb b/lib/arm/instructions/call_instruction.rb index 07b5b765..b2f83dd4 100644 --- a/lib/arm/instructions/call_instruction.rb +++ b/lib/arm/instructions/call_instruction.rb @@ -86,7 +86,7 @@ module Arm end end def to_s - "#{opcode} #{@first.to_asm} #{super}" + "#{opcode} #{@first} #{super}" end end end diff --git a/lib/arm/instructions/compare_instruction.rb b/lib/arm/instructions/compare_instruction.rb index aef44c88..ab155791 100644 --- a/lib/arm/instructions/compare_instruction.rb +++ b/lib/arm/instructions/compare_instruction.rb @@ -99,7 +99,7 @@ module Arm [] end def to_s - "#{opcode} #{@left.to_asm} , #{@right.to_asm} #{super}" + "#{opcode} #{@left} , #{@right} #{super}" end end end diff --git a/lib/arm/instructions/stack_instruction.rb b/lib/arm/instructions/stack_instruction.rb index 93cf16e4..33fd6c69 100644 --- a/lib/arm/instructions/stack_instruction.rb +++ b/lib/arm/instructions/stack_instruction.rb @@ -73,7 +73,7 @@ module Arm @first end def to_s - "#{opcode} [#{@first.collect {|f| f.to_asm}.join(',') }] #{super}" + "#{opcode} [#{@first.join(',') }] #{super}" end end diff --git a/test/arm/arm-helper.rb b/test/arm/arm-helper.rb index 19b48ed0..34bdb19c 100644 --- a/test/arm/arm-helper.rb +++ b/test/arm/arm-helper.rb @@ -5,8 +5,8 @@ require_relative '../helper' # tests are named as per assembler code, ie test_mov testing mov instruction # adc add and bic eor orr rsb rsc sbc sub mov mvn cmn cmp teq tst b call bx swi strb -module ArmHelper - # need Assembler and a block (see those classes) +module ArmHelper + # need Assembler and a block (see those classes) def setup @machine = Arm::ArmMachine end