summaryrefslogtreecommitdiff
path: root/test/stringio
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-17 21:36:17 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-17 21:36:17 +0000
commit4cb618e7aacf84cf7c241ee0513bbb37e1068c9d (patch)
tree9022b6c440e8dcaf11d9f0eb04125ef84fb58677 /test/stringio
parentb3b786c580995b31dcc0259890cefdb1385998c6 (diff)
merge revision(s) 66760,66761,66824: [Backport #15460]
Follow behaviour of IO#ungetbyte see r65802 and [Bug #14359] * expand tabs. 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/branches/ruby_2_6@66845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/stringio')
-rw-r--r--test/stringio/test_stringio.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb
index 89da34e4ec..6d1a6ea8d5 100644
--- a/test/stringio/test_stringio.rb
+++ b/test/stringio/test_stringio.rb
@@ -452,6 +452,10 @@ class TestStringIO < Test::Unit::TestCase
t.ungetbyte("\u{30eb 30d3 30fc}")
assert_equal(0, t.pos)
assert_equal("\u{30eb 30d3 30fc}\u7d05\u7389bar\n", s)
+
+ assert_nothing_raised {t.ungetbyte(-1)}
+ assert_nothing_raised {t.ungetbyte(256)}
+ assert_nothing_raised {t.ungetbyte(1<<64)}
end
def test_ungetc