lib/spoom/deadcode/plugins/ruby.rb in spoom-1.2.3 vs lib/spoom/deadcode/plugins/ruby.rb in spoom-1.2.4

- old
+ new

@@ -5,11 +5,11 @@ module Deadcode module Plugins class Ruby < Base extend T::Sig - ignore_method_names( + ignore_methods_named( "==", "extended", "included", "inherited", "initialize", @@ -24,10 +24,11 @@ def on_send(indexer, send) case send.name when "const_defined?", "const_get", "const_source_location" reference_symbol_as_constant(indexer, send, T.must(send.args.first)) when "send", "__send__", "try" - reference_send_first_symbol_as_method(indexer, send) + arg = send.args.first + indexer.reference_method(indexer.node_string(arg.value), send.node) if arg.is_a?(SyntaxTree::SymbolLiteral) when "alias_method" last_arg = send.args.last name = case last_arg when SyntaxTree::SymbolLiteral