summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-28 08:38:21 (GMT)
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-28 08:38:21 (GMT)
commit7292569d3fefacee8dd9cac739a07f4af1a1c808 (patch)
tree27ad29a08fe0c64d8dfcb8877738717d11c90173 /io.c
parent706c028909df2f9526c1cde1c2baa6bc0b4d318a (diff)
io.c: IO#write without args returns 0
This is consistent with other implementations of .write in openssl and stringio. * io.c (io_write_m): return 0 on argc == 0 [ruby-core:86285] [Bug #14338] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index cb24b28..ebf5743 100644
--- a/io.c
+++ b/io.c
@@ -1678,7 +1678,7 @@ io_writev(int argc, VALUE *argv, VALUE io)
static VALUE
io_write_m(int argc, VALUE *argv, VALUE io)
{
- if (argc > 1) {
+ if (argc != 1) {
return io_writev(argc, argv, io);
}
else {