<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -497,7 +497,7 @@ class IO
 
     data = String data
 
-    return if data.length == 0
+    return 0 if data.length == 0
     raise IOError if ((Platform::POSIX.fcntl(@descriptor, F_GETFL, 0) &amp; ACCMODE) == RDONLY)
     prim_write(data)
   end</diff>
      <filename>kernel/core/io.rb</filename>
    </modified>
    <modified>
      <diff>@@ -33,5 +33,9 @@ describe &quot;IO#write on a file&quot; do
     lambda { @readonly_file.write(&quot;&quot;) }.should_not raise_error
   end
 
+  it &quot;returns a length of 0 when writing a blank string&quot; do
+    @file.write('').should == 0
+  end
+
   it_behaves_like(:io_write, :write)
 end</diff>
      <filename>spec/ruby/1.8/core/io/write_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>56c0088f9b075769933c8c87e3c2d256cff3a3e8</id>
    </parent>
  </parents>
  <author>
    <name>Adam Wiggins</name>
    <email>adam@heroku.com</email>
  </author>
  <url>http://github.com/evanphx/rubinius/commit/4a1f39426fc60ae7c2ed0470259fa0752a46d030</url>
  <id>4a1f39426fc60ae7c2ed0470259fa0752a46d030</id>
  <committed-date>2008-04-27T02:48:23-07:00</committed-date>
  <authored-date>2008-04-26T22:57:09-07:00</authored-date>
  <message>IO#write returns 0 when writing a blank string, to match behavior of MRI

Signed-off-by: Dirkjan Bussink &lt;d.bussink@gmail.com&gt;</message>
  <tree>a984cd937787d1d59432848e34becef4bd27be8e</tree>
  <committer>
    <name>Dirkjan Bussink</name>
    <email>d.bussink@gmail.com</email>
  </committer>
</commit>
