aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-08-25 11:25:41 -0700
committerJeremy Evans <code@jeremyevans.net>2020-02-27 10:17:54 -0800
commit54499d78109037d7c37bc09a8c3ffa0050da5aca (patch)
tree89d52ead3edc7cd67328ddabb5f6a8f3cbbc9314 /io.c
parent229ba1215fa7c8181b9296dff22807fb17442c74 (diff)
downloadruby-54499d78109037d7c37bc09a8c3ffa0050da5aca.tar.gz
Remove support for passing nil to IO#ungetc
Fixes [Bug #13675]
Diffstat (limited to 'io.c')
-rw-r--r--io.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/io.c b/io.c
index 03209f752b..9634e2c57d 100644
--- a/io.c
+++ b/io.c
@@ -4350,7 +4350,6 @@ rb_io_ungetc(VALUE io, VALUE c)
GetOpenFile(io, fptr);
rb_io_check_char_readable(fptr);
- if (NIL_P(c)) return Qnil;
if (FIXNUM_P(c)) {
c = rb_enc_uint_chr(FIX2UINT(c), io_read_encoding(fptr));
}