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