From 5cc3bc9e46558ef09e80314711dced5211d861f9 Mon Sep 17 00:00:00 2001 From: Jason Lunn Date: Fri, 10 Jan 2025 12:59:18 -0500 Subject: [PATCH] Extend list of ignored array methods to include `fetch_values` introduced in Ruby 3.4. --- ruby/tests/repeated_field_test.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ruby/tests/repeated_field_test.rb b/ruby/tests/repeated_field_test.rb index 143a9ead06a5b..e4983a566f2cc 100755 --- a/ruby/tests/repeated_field_test.rb +++ b/ruby/tests/repeated_field_test.rb @@ -18,15 +18,17 @@ def test_acts_like_enumerator def test_acts_like_an_array m = TestMessage.new arr_methods = ([].methods - TestMessage.new.repeated_string.methods) - # jRuby additions to the Array class that we can ignore + # JRuby additions to the Array class that we ignore arr_methods -= [ :indices, :iter_for_each, :iter_for_each_index, :iter_for_each_with_index, :dimensions, :copy_data, :copy_data_simple, :nitems, :iter_for_reverse_each, :indexes, :append, :prepend] arr_methods -= [:filter!] - # ruby 2.7 methods we can ignore + # ruby 2.7 methods we ignore arr_methods -= [:deconstruct, :resolve_feature_path] - # ruby 3.1 methods we can ignore + # ruby 3.1 methods we ignore arr_methods -= [:intersect?] + # ruby 3.4 methods we ignore + arr_methods -= [:fetch_values] arr_methods.each do |method_name| assert_respond_to m.repeated_string, method_name end