summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTomoyuki Sahara <[email protected]>2014-04-17 15:45:31 +0900
committerTomoyuki Sahara <[email protected]>2014-04-17 15:45:31 +0900
commit810e37b1c3202eef6164933234d137d8d095e034 (patch)
treed8c35243ffc57b8b9215c9e6b24a8f093fc4f68d
parentd5cf1de1aeb776376d1698d7667b88868d7b1efc (diff)
downloadmruby-810e37b1c3202eef6164933234d137d8d095e034.tar.gz
mruby-810e37b1c3202eef6164933234d137d8d095e034.zip
return value of syswrite may be less than length of given string.
-rw-r--r--mrblib/io.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrblib/io.rb b/mrblib/io.rb
index 4c69a4b99..249488ac4 100644
--- a/mrblib/io.rb
+++ b/mrblib/io.rb
@@ -99,7 +99,7 @@ class IO
return str.size unless str.size > 0
len = syswrite(str)
- if str.size == len
+ if len != -1
@pos += len
return len
end