From daffa0579e492e497193283504e5f53195134b04 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Tue, 10 Nov 2015 19:10:11 +0200 Subject: [PATCH] another opal hack in opal 13 / 10 = 1.3 whereas in ruby its 1 --- lib/interpreter/interpreter.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/interpreter/interpreter.rb b/lib/interpreter/interpreter.rb index c23a835f..d69331dd 100644 --- a/lib/interpreter/interpreter.rb +++ b/lib/interpreter/interpreter.rb @@ -208,6 +208,8 @@ module Interpreter if( result.is_a? Bignum) @flags[:overflow] = true result = result % 2**62 + else + result = result.to_i end log.debug "#{@instruction} == #{result}(#{result.class}) (#{left}|#{right})" right = set_register(@instruction.left , result)