From 9a48ab1330a3f38c40238b611498a0b35fe8be71 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Fri, 17 Jul 2015 11:39:20 +0300 Subject: [PATCH] fix eval for opal consumption --- lib/virtual/machine.rb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/virtual/machine.rb b/lib/virtual/machine.rb index 6f2e3042..5cf7ab89 100644 --- a/lib/virtual/machine.rb +++ b/lib/virtual/machine.rb @@ -121,17 +121,13 @@ module Virtual end def boot + return if @booted boot_parfait! @init = Block.new("init",nil) @init.add_code Register::RegisterMain.new( self.space.get_init ) @booted = true end - # for testing, make sure no old artefacts hang around - #maybe should be moved to test dir - def self.reboot - raise "redo" - end def compile_main bytes syntax = @parser.parse_with_debug(bytes) parts = Parser::Transform.new.apply(syntax) @@ -140,7 +136,8 @@ module Virtual private def run_blocks_for pass_class - pass = eval pass_class + parts = pass_class.split("::") + pass = Object.const_get(parts[0]).const_get parts[1] raise "no such pass-class as #{pass_class}" unless pass @blocks.each do |block| raise "nil block " unless block