diff options
author | Benoit Daloze <eregontp@gmail.com> | 2020-06-27 15:51:37 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2020-06-27 15:51:37 +0200 |
commit | b3fa158d1c4d8e03b8dc04f1e4f9940a8a4ef44c (patch) | |
tree | fa8a62d6192c24a21e70aa02589507adfe4e4e6a /spec/ruby/core/io/ungetc_spec.rb | |
parent | 64d8c0815e6ab042e8a67a670bda9f34404fa662 (diff) |
Update to ruby/spec@b6b7752
Diffstat (limited to 'spec/ruby/core/io/ungetc_spec.rb')
-rw-r--r-- | spec/ruby/core/io/ungetc_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/ruby/core/io/ungetc_spec.rb b/spec/ruby/core/io/ungetc_spec.rb index 85c15b5a71..dc31c3743a 100644 --- a/spec/ruby/core/io/ungetc_spec.rb +++ b/spec/ruby/core/io/ungetc_spec.rb @@ -136,6 +136,10 @@ describe "IO#ungetc" do @io.ungetc(100).should be_nil end + it "raises IOError on stream not opened for reading" do + -> { STDOUT.ungetc(100) }.should raise_error(IOError, "not opened for reading") + end + it "raises IOError on closed stream" do @io.getc @io.close |