From 6b8d972f123882e5199379e8a0e6fcad0d264d7f Mon Sep 17 00:00:00 2001 From: Martin Vidner Date: Tue, 28 Jun 2016 10:31:53 +0200 Subject: [PATCH] Remove RubyLint::ConstantPath#root_node It is no longer used since 971a7dad4e84893a4aa19622d7c2ea6f50dd0764 --- lib/ruby-lint/constant_path.rb | 9 --------- spec/ruby-lint/constant_path_spec.rb | 7 ------- 2 files changed, 16 deletions(-) diff --git a/lib/ruby-lint/constant_path.rb b/lib/ruby-lint/constant_path.rb index 9c1d697..188e21b 100644 --- a/lib/ruby-lint/constant_path.rb +++ b/lib/ruby-lint/constant_path.rb @@ -55,15 +55,6 @@ def resolve(scope) return current end - ## - # Returns the very first segment of the constant path as an AST node. - # - # @return [RubyLint::AST::Node] - # - def root_node - return constant_segments.first - end - ## # Returns a String containing the full constant path, e.g. # "RubyLint::Runner". diff --git a/spec/ruby-lint/constant_path_spec.rb b/spec/ruby-lint/constant_path_spec.rb index c4529c8..f5dce52 100644 --- a/spec/ruby-lint/constant_path_spec.rb +++ b/spec/ruby-lint/constant_path_spec.rb @@ -1,13 +1,6 @@ require 'spec_helper' describe RubyLint::ConstantPath do - example 'return the root node of a constant path' do - node = s(:const, s(:const, nil, :Foo), :Bar) - root = RubyLint::ConstantPath.new(node).root_node - - root.should == [:const, 'Foo'] - end - example 'generate the name of a constant path' do node = s(:const, s(:const, nil, :Foo), :Bar) name = RubyLint::ConstantPath.new(node).to_s