diff --git a/lib/i18n/tasks/scanners/ruby_ast_scanner.rb b/lib/i18n/tasks/scanners/ruby_ast_scanner.rb
index <HASH>..<HASH> 100644
--- a/lib/i18n/tasks/scanners/ruby_ast_scanner.rb
+++ b/lib/i18n/tasks/scanners/ruby_ast_scanner.rb
@@ -40,7 +40,7 @@ module I18n::Tasks::Scanners
             @parser.parse(make_buffer(path, comment.text.sub(MAGIC_COMMENT_PREFIX, '').split(/\s+(?=t)/).join('; ')))
         ) do |send_node, _method_name|
           # method_name is not available at this stage
-          send_node_to_key_occurrence(send_node, nil, location: associated_node || comment)
+          send_node_to_key_occurrence(send_node, nil, location: associated_node || comment.location)
         end
       end
     rescue Exception => e
AST Scanner: fix magic comment location reporting