diff --git a/test/rdoc/test_rdoc_parser_prism_ruby.rb b/test/rdoc/test_rdoc_parser_prism_ruby.rb index 627ffd90ad..52b04f8b86 100644 --- a/test/rdoc/test_rdoc_parser_prism_ruby.rb +++ b/test/rdoc/test_rdoc_parser_prism_ruby.rb @@ -1023,7 +1023,7 @@ class A def test_module_function util_parser <<~RUBY - class A + module A def m1; end def m2; end def m3; end @@ -1031,9 +1031,9 @@ def m3; end module_function def m4; end end RUBY - klass = @store.find_class_named 'A' - instance_methods = klass.method_list.reject(&:singleton) - singleton_methods = klass.method_list.select(&:singleton) + mod = @store.find_module_named 'A' + instance_methods = mod.method_list.reject(&:singleton) + singleton_methods = mod.method_list.select(&:singleton) if accept_legacy_bug? instance_methods.last.visibility = :private singleton_methods << singleton_methods.last.dup