From 8d00b02d82d86abe51773dc2c1751843bb538ae5 Mon Sep 17 00:00:00 2001 From: Ondřej Surý Date: Tue, 28 Jun 2011 15:28:34 +0200 Subject: Imported Upstream version 2011.06.23 --- src/pkg/bytes/buffer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pkg/bytes/buffer.go') diff --git a/src/pkg/bytes/buffer.go b/src/pkg/bytes/buffer.go index 1acd4e05c..5de86105d 100644 --- a/src/pkg/bytes/buffer.go +++ b/src/pkg/bytes/buffer.go @@ -280,7 +280,7 @@ func (b *Buffer) ReadRune() (r int, size int, err os.Error) { // from any read operation.) func (b *Buffer) UnreadRune() os.Error { if b.lastRead != opReadRune { - return os.ErrorString("bytes.Buffer: UnreadRune: previous operation was not ReadRune") + return os.NewError("bytes.Buffer: UnreadRune: previous operation was not ReadRune") } b.lastRead = opInvalid if b.off > 0 { @@ -295,7 +295,7 @@ func (b *Buffer) UnreadRune() os.Error { // returns an error. func (b *Buffer) UnreadByte() os.Error { if b.lastRead != opReadRune && b.lastRead != opRead { - return os.ErrorString("bytes.Buffer: UnreadByte: previous operation was not a read") + return os.NewError("bytes.Buffer: UnreadByte: previous operation was not a read") } b.lastRead = opInvalid if b.off > 0 { -- cgit v1.2.3