summaryrefslogtreecommitdiff
path: root/test/ruby/test_encoding.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_encoding.rb')
-rw-r--r--test/ruby/test_encoding.rb21
1 files changed, 20 insertions, 1 deletions
diff --git a/test/ruby/test_encoding.rb b/test/ruby/test_encoding.rb
index 7ccbb31f50..0cd5bf49dc 100644
--- a/test/ruby/test_encoding.rb
+++ b/test/ruby/test_encoding.rb
@@ -154,7 +154,26 @@ class TestEncoding < Test::Unit::TestCase
r, _obj = Ractor.select(*rs)
rs.delete(r)
end
- assert rs.empty?
+ assert_empty rs
+ end;
+ end
+
+ def test_ractor_set_default_external_string
+ assert_ractor("#{<<~"begin;"}\n#{<<~'end;'}")
+ begin;
+ $-w = nil
+ rs = []
+ 7.times do |i|
+ rs << Ractor.new(i) do |i|
+ Encoding.default_external = "us-ascii"
+ end
+ end
+
+ while rs.any?
+ r, _obj = Ractor.select(*rs)
+ rs.delete(r)
+ end
+ assert_empty rs
end;
end
end