[macruby-changes] [3722] MacRuby/branches/icu/lib/stringio.rb
source_changes at macosforge.org
source_changes at macosforge.org
Tue Mar 9 17:53:56 PST 2010
Revision: 3722
http://trac.macosforge.org/projects/ruby/changeset/3722
Author: lsansonetti at apple.com
Date: 2010-03-09 17:53:55 -0800 (Tue, 09 Mar 2010)
Log Message:
-----------
ByteString no longer exist
Modified Paths:
--------------
MacRuby/branches/icu/lib/stringio.rb
Modified: MacRuby/branches/icu/lib/stringio.rb
===================================================================
--- MacRuby/branches/icu/lib/stringio.rb 2010-03-10 01:46:19 UTC (rev 3721)
+++ MacRuby/branches/icu/lib/stringio.rb 2010-03-10 01:53:55 UTC (rev 3722)
@@ -52,7 +52,7 @@
#
# Creates new StringIO instance from with _string_ and _mode_.
#
- def initialize(string = ByteString.new, mode = nil)
+ def initialize(string = String.new, mode = nil)
@string = string.to_str
@pos = 0
@lineno = 0
@@ -127,7 +127,7 @@
#
# See IO#read.
#
- def read(length = nil, buffer = ByteString.new)
+ def read(length = nil, buffer = String.new)
raise IOError, "not opened for reading" unless @readable
raise TypeError unless buffer.respond_to?(:to_str)
buffer = buffer.to_str
@@ -152,7 +152,7 @@
#
# Similar to #read, but raises +EOFError+ at end of string instead of
# returning +nil+, as well as IO#sysread does.
- def sysread(length = nil, buffer = ByteString.new)
+ def sysread(length = nil, buffer = String.new)
val = read(length, buffer)
( buffer.clear && raise(IO::EOFError, "end of file reached")) if val == nil
val
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100309/3e41ba22/attachment.html>
More information about the macruby-changes
mailing list