diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-02-21 19:40:58 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-02-21 12:06:19 +0000 |
| commit | 7ef9110b1eaefbcbf72f25ad941c2c3b7ed3db01 (patch) | |
| tree | 2e5994b95ad0290cb0e2f52c5e6205f1b702b48e /test | |
| parent | fa6b9f75efa8411829aa987b81b9c5ca0e081462 (diff) | |
[ruby/stringio] Fix SEGV at unget to a null device StringIO
https://github.com/ruby/stringio/commit/eb4ee49218
Diffstat (limited to 'test')
| -rw-r--r-- | test/stringio/test_stringio.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb index ffaa2efa0a..570b3d7ad6 100644 --- a/test/stringio/test_stringio.rb +++ b/test/stringio/test_stringio.rb @@ -64,6 +64,10 @@ class TestStringIO < Test::Unit::TestCase assert_nil io.gets io.puts "abc" assert_nil io.string + + # Null device StringIO just drop ungot string + io.ungetc '#' + assert_nil io.getc end def test_truncate |
