aboutsummaryrefslogtreecommitdiff
path: root/ruby/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ruby/tests')
-rw-r--r--ruby/tests/basic.rb4
-rw-r--r--ruby/tests/repeated_field_test.rb2
2 files changed, 4 insertions, 2 deletions
diff --git a/ruby/tests/basic.rb b/ruby/tests/basic.rb
index ad34d53d..d151022e 100644
--- a/ruby/tests/basic.rb
+++ b/ruby/tests/basic.rb
@@ -336,7 +336,9 @@ module BasicTest
# strings are immutable so we can't do this, but serialize should catch it.
m.optional_string = "asdf".encode!('UTF-8')
- assert_raise RuntimeError do
+ # Ruby 2.5 changed to raise FrozenError. However, assert_raise don't
+ # accept subclass. Don't specify type here.
+ assert_raise do
m.optional_string.encode!('ASCII-8BIT')
end
end
diff --git a/ruby/tests/repeated_field_test.rb b/ruby/tests/repeated_field_test.rb
index 61ac4afd..a4f3aab8 100644
--- a/ruby/tests/repeated_field_test.rb
+++ b/ruby/tests/repeated_field_test.rb
@@ -18,7 +18,7 @@ class RepeatedFieldTest < Test::Unit::TestCase
# jRuby additions to the Array class that we can 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]
+ :nitems, :iter_for_reverse_each, :indexes, :append, :prepend]
arr_methods.each do |method_name|
assert m.repeated_string.respond_to?(method_name) == true, "does not respond to #{method_name}"
end