summaryrefslogtreecommitdiff
path: root/test/stringio
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-15 06:41:58 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-15 06:41:58 +0000
commitd154bec0d5f0dd32e0d30559ab8a0a7ed8be98d2 (patch)
tree742aefd4559c4b84b11de474ae6fb005c037faee /test/stringio
parent5e84537d32c3e2f21071384e2c967fe0308d408d (diff)
downloadruby-d154bec0d5f0dd32e0d30559ab8a0a7ed8be98d2.tar.gz
setbyte / ungetbyte allow out-of-range integers
* string.c: String#setbyte to accept arbitrary integers [Bug #15460] * io.c: ditto for IO#ungetbyte * ext/strringio/stringio.c: ditto for StringIO#ungetbyte git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/stringio')
-rw-r--r--test/stringio/test_stringio.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb
index b508d56310..6d1a6ea8d5 100644
--- a/test/stringio/test_stringio.rb
+++ b/test/stringio/test_stringio.rb
@@ -453,9 +453,9 @@ class TestStringIO < Test::Unit::TestCase
assert_equal(0, t.pos)
assert_equal("\u{30eb 30d3 30fc}\u7d05\u7389bar\n", s)
- assert_raise(RangeError) {t.ungetbyte(-1)}
- assert_raise(RangeError) {t.ungetbyte(256)}
- assert_raise(RangeError) {t.ungetbyte(1<<64)}
+ assert_nothing_raised {t.ungetbyte(-1)}
+ assert_nothing_raised {t.ungetbyte(256)}
+ assert_nothing_raised {t.ungetbyte(1<<64)}
end
def test_ungetc