From d5a63ec4316ae09e05ddfb631e94a99611fb410a Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Thu, 31 Aug 2017 14:18:12 +0300 Subject: [PATCH] rename one ruby compiler to differentiate --- lib/rubyx/ruby_compiler.rb | 2 +- test/rubyx/fragments/test_hello.rb | 2 +- test/rubyx/passes/test_type_collector.rb | 2 +- test/rubyx/test_ruby_compiler.rb | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/rubyx/ruby_compiler.rb b/lib/rubyx/ruby_compiler.rb index 9354eb62..f1e87939 100644 --- a/lib/rubyx/ruby_compiler.rb +++ b/lib/rubyx/ruby_compiler.rb @@ -10,7 +10,7 @@ require_relative "ruby_method" module Rubyx - class RubyCompiler < Passes::TotalProcessor + class RubyxCompiler < Passes::TotalProcessor def self.compile( input ) ast = Parser::Ruby22.parse( input ) diff --git a/test/rubyx/fragments/test_hello.rb b/test/rubyx/fragments/test_hello.rb index 18a9e800..b95d1375 100644 --- a/test/rubyx/fragments/test_hello.rb +++ b/test/rubyx/fragments/test_hello.rb @@ -10,7 +10,7 @@ module Rubyx @string_input = as_main '"Hello there".putstring' Risc.machine.boot # do_clean_compile - RubyCompiler.compile @string_input + RubyxCompiler.compile @string_input Risc::Collector.collect_space @interpreter = Risc::Interpreter.new @interpreter.start Risc.machine.init diff --git a/test/rubyx/passes/test_type_collector.rb b/test/rubyx/passes/test_type_collector.rb index 8523efc6..f40dd65b 100644 --- a/test/rubyx/passes/test_type_collector.rb +++ b/test/rubyx/passes/test_type_collector.rb @@ -29,7 +29,7 @@ module Rubyx end def test_compile_class - RubyCompiler.compile "class TestIvar < Object ; def meth; @ivar;end; end" + RubyxCompiler.compile "class TestIvar < Object ; def meth; @ivar;end; end" itest = Parfait.object_space.get_class_by_name(:TestIvar) assert itest assert itest.instance_type.names.include?(:ivar) , itest.instance_type.names.inspect diff --git a/test/rubyx/test_ruby_compiler.rb b/test/rubyx/test_ruby_compiler.rb index 08e4a2c2..9b48acb9 100644 --- a/test/rubyx/test_ruby_compiler.rb +++ b/test/rubyx/test_ruby_compiler.rb @@ -9,20 +9,20 @@ module Rubyx def test_doesnt_create_existing_clas space_class = Parfait.object_space.get_class_by_name(:Space) - RubyCompiler.compile "class Space ; end" + RubyxCompiler.compile "class Space ; end" clazz = Parfait.object_space.get_class_by_name(:Space) assert_equal clazz , space_class end def test_creates_class_without_deriviation - RubyCompiler.compile "class Testing ; end" + RubyxCompiler.compile "class Testing ; end" clazz = Parfait.object_space.get_class_by_name(:Testing) assert clazz , "No classes created" assert_equal :Object , clazz.super_class_name end def test_creates_class_with_deriviation - RubyCompiler.compile "class Test2 < List ;end" + RubyxCompiler.compile "class Test2 < List ;end" clazz = Parfait.object_space.get_class_by_name(:Test2) assert clazz, "No classes created" assert_equal :List , clazz.super_class_name @@ -30,14 +30,14 @@ module Rubyx def test_space_is_unchanged_by_compile space1 = Parfait.object_space.get_class_by_name(:Space) - RubyCompiler.compile "class Space ;end" + RubyxCompiler.compile "class Space ;end" space2 = Parfait.object_space.get_class_by_name(:Space) assert_equal space1 , space2 end def test_space_type_is_unchanged_by_compile space1 = Parfait.object_space.get_class_by_name(:Space).instance_type - RubyCompiler.compile "class Space ;end" + RubyxCompiler.compile "class Space ;end" space2 = Parfait.object_space.get_class_by_name(:Space).instance_type assert_equal space1 , space2 end