From 0b161ffa0611d3873f3ccbcb44f8cde59827c74e Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Thu, 31 Aug 2017 16:11:06 +0300 Subject: [PATCH] move ruby_method out of rubyx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ruby getting ready for destruction as it’s not used anymore --- lib/rubyx/passes/method_collector.rb | 2 +- lib/rubyx/ruby_compiler.rb | 2 +- lib/vool/statements/method_statement.rb | 2 +- lib/{rubyx/ruby_method.rb => vool/vool_method.rb} | 4 ++-- test/vool/compilers/test_method_compiler.rb | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) rename lib/{rubyx/ruby_method.rb => vool/vool_method.rb} (96%) diff --git a/lib/rubyx/passes/method_collector.rb b/lib/rubyx/passes/method_collector.rb index 7df58338..1ade8292 100644 --- a/lib/rubyx/passes/method_collector.rb +++ b/lib/rubyx/passes/method_collector.rb @@ -16,7 +16,7 @@ module Rubyx name , args , body = *statement args_type = make_type(args) locals_type = make_locals(body) - @methods << RubyMethod.new(name , args_type , locals_type , body ) + @methods << Vool::VoolMethod.new(name , args_type , locals_type , body ) end private diff --git a/lib/rubyx/ruby_compiler.rb b/lib/rubyx/ruby_compiler.rb index f1e87939..d9f04ffa 100644 --- a/lib/rubyx/ruby_compiler.rb +++ b/lib/rubyx/ruby_compiler.rb @@ -6,7 +6,7 @@ require_relative "passes/method_collector" require_relative "passes/method_compiler" require_relative "passes/locals_collector" require_relative "passes/normalizer" -require_relative "ruby_method" +require "vool/vool_method" module Rubyx diff --git a/lib/vool/statements/method_statement.rb b/lib/vool/statements/method_statement.rb index 01917237..1e03beb8 100644 --- a/lib/vool/statements/method_statement.rb +++ b/lib/vool/statements/method_statement.rb @@ -31,7 +31,7 @@ module Vool def create_objects args_type = make_type locals_type = make_locals - method = Rubyx::RubyMethod.new(name , args_type , locals_type , body ) + method = Vool::VoolMethod.new(name , args_type , locals_type , body ) @clazz.add_method( method ) # compile_methods(clazz,methods) end diff --git a/lib/rubyx/ruby_method.rb b/lib/vool/vool_method.rb similarity index 96% rename from lib/rubyx/ruby_method.rb rename to lib/vool/vool_method.rb index 9382b3ed..c6ba4af1 100644 --- a/lib/rubyx/ruby_method.rb +++ b/lib/vool/vool_method.rb @@ -1,6 +1,6 @@ -module Rubyx +module Vool - class RubyMethod + class VoolMethod attr_reader :name , :args_type , :locals_type , :source diff --git a/test/vool/compilers/test_method_compiler.rb b/test/vool/compilers/test_method_compiler.rb index 3ea6bb3d..07ec7b60 100644 --- a/test/vool/compilers/test_method_compiler.rb +++ b/test/vool/compilers/test_method_compiler.rb @@ -33,7 +33,7 @@ module Vool def test_creates_method_in_class method = create_method assert method , "No method created" - assert_equal Rubyx::RubyMethod , method.class + assert_equal Vool::VoolMethod , method.class end