[macruby-changes] [MacRuby/MacRuby] 976f5c: StringIO#puts will write a newline when was passed...

noreply at github.com noreply at github.com
Wed Apr 6 02:40:20 PDT 2011


Branch: refs/heads/master
Home:   https://github.com/MacRuby/MacRuby

Commit: 976f5c6331122bdf3998472554063225473b590d
    https://github.com/MacRuby/MacRuby/commit/976f5c6331122bdf3998472554063225473b590d
Author: Watson <watson1978 at gmail.com>
Date:   2011-04-06 (Wed, 06 Apr 2011)

Changed paths:
  M lib/stringio.rb
  M spec/frozen/tags/macruby/library/stringio/puts_tags.txt

Log Message:
-----------
StringIO#puts will write a newline when was passed empty string.

Test Script:
{{{
require 'test/unit/assertions.rb'
include Test::Unit::Assertions
require 'stringio'

f = StringIO.new
f.puts ""
assert_equal("\n", f.string)

f = StringIO.new
f.puts "", "a", "b", "c\n\n"
assert_equal("\na\nb\nc\n\n", f.string)

puts :ok
}}}




More information about the macruby-changes mailing list