diff --git a/test/unit/mock_test.rb b/test/unit/mock_test.rb index 5cf91a883..020c9b618 100644 --- a/test/unit/mock_test.rb +++ b/test/unit/mock_test.rb @@ -55,16 +55,13 @@ def test_should_be_equal MACOS_EXCLUDED_METHODS = MACOS && MACOS_VERSION >= MACOS_MOJAVE_VERSION ? [:syscall] : [] - RUBY_V19_AND_LATER_EXCLUDED_METHODS = [ - :object_id, - :method_missing, - :singleton_method_undefined, - :initialize, - :String, - :Array, - :singleton_method_added, - *MACOS_EXCLUDED_METHODS - ].freeze + RUBY_V19_AND_LATER_EXCLUDED_METHODS = + (PRE_RUBY_V19_EXCLUDED_METHODS.map(&:to_sym) + [ + :object_id, + :String, + :singleton_method_added, + *MACOS_EXCLUDED_METHODS + ]).freeze OBJECT_METHODS = STANDARD_OBJECT_PUBLIC_INSTANCE_METHODS.reject do |m| (m =~ /^__.*__$/) ||