summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Oliver Nutter <headius@headius.com>2024-03-12 23:46:49 -0500
committergit <svn-admin@ruby-lang.org>2024-03-13 04:46:54 +0000
commit0b7487b44ecc0f95dcc8bfa0fdf7d5915dcc0f8f (patch)
treef21873f40fffa21aa7e7f2e172d8757e3572ccc1
parent8c81a6bd613d3cabaccf55207cdc8155bea0d2b7 (diff)
[ruby/stringio] Various cleanup for JRuby ext
(https://github.com/ruby/stringio/pull/85) * Fix compile warnings on latest Java. * Adjust one test for JRuby erroring on bad pos= value. * Replace hard JVM synchronization with a spin lock. * Avoid duplicate reads of state fields where possible. * Remove long-deprecated codepoints, chars, bytes, lines methods. * Mark fcntl as not implemented * Split most of the remaining variable-arity methods. https://github.com/ruby/stringio/commit/31a9d42e6c
-rw-r--r--test/stringio/test_stringio.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb
index 8afbcf3545..ae8e845497 100644
--- a/test/stringio/test_stringio.rb
+++ b/test/stringio/test_stringio.rb
@@ -237,8 +237,9 @@ class TestStringIO < Test::Unit::TestCase
def test_write_integer_overflow
f = StringIO.new
- f.pos = RbConfig::LIMITS["LONG_MAX"]
assert_raise(ArgumentError) {
+ # JRuby errors when setting pos to an out-of-range value
+ f.pos = RbConfig::LIMITS["LONG_MAX"]
f.write("pos + len overflows")
}
end