summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/ruby/test_class.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb
index 4f4091d299..f84c2d7a78 100644
--- a/test/ruby/test_class.rb
+++ b/test/ruby/test_class.rb
@@ -541,7 +541,9 @@ class TestClass < Test::Unit::TestCase
m = Module.new
o = m.module_eval "class A\u{3042}; self; end.new"
assert_raise_with_message(TypeError, /A\u{3042}/) {
- o::Foo
+ EnvUtil.with_default_internal(Encoding::UTF_8) {
+ o::Foo
+ }
}
end