diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-15 06:41:58 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-15 06:41:58 +0000 |
commit | d154bec0d5f0dd32e0d30559ab8a0a7ed8be98d2 (patch) | |
tree | 742aefd4559c4b84b11de474ae6fb005c037faee /test/stringio | |
parent | 5e84537d32c3e2f21071384e2c967fe0308d408d (diff) |
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.rb | 6 |
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 |