[macruby-changes] [MacRuby/MacRuby] a92305: StringIO#write will raise an IOError if string is ...

noreply at github.com noreply at github.com
Tue Apr 5 06:15:21 PDT 2011


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

Commit: a92305e68196c3634a6930928e39a7c2bab2c72f
    https://github.com/MacRuby/MacRuby/commit/a92305e68196c3634a6930928e39a7c2bab2c72f
Author: Watson <watson1978 at gmail.com>
Date:   2011-04-05 (Tue, 05 Apr 2011)

Changed paths:
  M lib/stringio.rb

Log Message:
-----------
StringIO#write will raise an IOError if string is frozen.

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

s = ""
f = StringIO.new(s, "w")
s.freeze
assert_raise(IOError){ f.write("foo") }

puts :ok
}}}


Commit: 415be77426b8653fd2e00862b59b6399afcbc8eb
    https://github.com/MacRuby/MacRuby/commit/415be77426b8653fd2e00862b59b6399afcbc8eb
Author: Watson <watson1978 at gmail.com>
Date:   2011-04-05 (Tue, 05 Apr 2011)

Changed paths:
  M lib/stringio.rb

Log Message:
-----------
Fix a bug of StringIO#gets(sep) when plural characters were passed to sep.

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

f = StringIO.new("foo\nbar\nbaz\n")
assert_equal("foo\nbar", f.gets("bar"))

puts :ok
}}}


Compare: https://github.com/MacRuby/MacRuby/compare/76acad6...415be77


More information about the macruby-changes mailing list