[#3113] Problem in RSS library, or problem in my blog :) — Dave Thomas <dave@...>
I've been trying to use the new RSS library to parse a number of
7 messages
2004/07/01
[#3136] Wrong rdoc formatting in {array,pack}.c — Johan Holmberg <holmberg@...>
7 messages
2004/07/05
[#3162] Re: [doc-patch] Wrong rdoc formatting in {array,pack}.c
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/07/09
Hello.
[#3170] Another rdoc formatting error in array.c
— Johan Holmberg <holmberg@...>
2004/07/10
[#3172] Re: [doc-patch] Another rdoc formatting error in array.c
— "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
2004/07/12
Hello.
[#3141] rexml/validation/validationexception is missing. — nobu.nokada@...
Hi,
5 messages
2004/07/06
[#3154] Nonblocking socket connect - Win32 - 181 — "Jean-Francois Nadeau" <jean-francois.nadeau@...>
Hi,
4 messages
2004/07/08
[#3167] Inconsistent "call-seq" usage etc. — Johan Holmberg <holmberg@...>
7 messages
2004/07/09
[#3168] Re: [doc] Inconsistent "call-seq" usage etc.
— Dave Thomas <dave@...>
2004/07/09
[#3171] binding a URL to a label in RDoc — Ian Macdonald <ian@...>
Hello,
6 messages
2004/07/12
[#3199] Trying to understand \G — Dave Thomas <dave@...>
I'm being silly again, but I can't get \G to work with String.index. If
12 messages
2004/07/16
[#3213] Typo and grammar/style fixes for ext/win32ole/win32ole.c — Jos Backus <jos@...>
The attached patch attempts to create a more consistent style for error
4 messages
2004/07/19
[#3216] Re: Incident Analysis of the intrusion on helium.ruby-lang.org May 2004 — "Sean E. Russell" <ser@...>
Hi,
6 messages
2004/07/21
[#3228] Core support for Gems, and namespace — "Luke A. Kanies" <luke@...>
Hi all,
21 messages
2004/07/27
[#3229] Re: Core support for Gems, and namespace
— Dave Thomas <dave@...>
2004/07/27
[#3232] Re: Core support for Gems, and namespace
— "Luke A. Kanies" <luke@...>
2004/07/27
On Tue, 27 Jul 2004, Dave Thomas wrote:
[#3233] Re: Core support for Gems, and namespace
— Gavin Sinclair <gsinclair@...>
2004/07/27
On Wednesday, July 28, 2004, 12:48:07 AM, Luke wrote:
[#3235] Re: Core support for Gems, and namespace
— "Luke A. Kanies" <luke@...>
2004/07/27
On Wed, 28 Jul 2004, Gavin Sinclair wrote:
[#3230] Re: Core support for Gems, and namespace
— Austin Ziegler <halostatue@...>
2004/07/27
On Tue, 27 Jul 2004 11:39:08 +0900, Luke A. Kanies <luke@madstop.com> wrote:
[#3234] Re: Core support for Gems, and namespace
— "Luke A. Kanies" <luke@...>
2004/07/27
On Tue, 27 Jul 2004, Austin Ziegler wrote:
[#3238] Re: Core support for Gems, and namespace
— Austin Ziegler <halostatue@...>
2004/07/27
On Wed, 28 Jul 2004 00:14:29 +0900, Luke A. Kanies <luke@madstop.com> wrote:
[#3243] Re: Core support for Gems, and namespace
— Gavin Sinclair <gsinclair@...>
2004/07/28
On Wednesday, July 28, 2004, 3:23:46 AM, Austin wrote:
[#3248] Re: Core support for Gems, and namespace
— Austin Ziegler <halostatue@...>
2004/07/28
On Wed, 28 Jul 2004 11:29:53 +0900, Gavin Sinclair
[#3249] Re: Core support for Gems, and namespace
— Mauricio Fern疣dez <batsman.geo@...>
2004/07/28
On Wed, Jul 28, 2004 at 11:29:53AM +0900, Gavin Sinclair wrote:
[RCR 265] Readable/Writeable modules
From:
Michael Neumann <mneumann@...>
Date:
2004-07-19 13:04:23 UTC
List:
ruby-core #3212
Appended is the patch for RCR 265. http://rcrchive.net/rcr/RCR/RCR265 Regards, Michael
Attachments (1)
readable-writeable.diff
(3.58 KB, text/x-diff)
? y.tab.h
Index: io.c
===================================================================
RCS file: /src/ruby/io.c,v
retrieving revision 1.285
diff -u -r1.285 io.c
--- io.c 29 Jun 2004 01:17:39 -0000 1.285
+++ io.c 19 Jul 2004 12:55:19 -0000
@@ -86,6 +86,9 @@
# error off_t is bigger than long, but you have no long long...
#endif
+VALUE rb_mReadable;
+VALUE rb_mWriteable;
+
VALUE rb_cIO;
VALUE rb_eEOFError;
VALUE rb_eIOError;
@@ -5354,6 +5357,9 @@
cygwin_internal(CW_PERFILE, pf);
#endif
+ rb_mReadable = rb_define_module("Readable");
+ rb_mWriteable = rb_define_module("Writeable");
+
rb_eIOError = rb_define_class("IOError", rb_eStandardError);
rb_eEOFError = rb_define_class("EOFError", rb_eIOError);
@@ -5382,6 +5388,8 @@
rb_cIO = rb_define_class("IO", rb_cObject);
rb_include_module(rb_cIO, rb_mEnumerable);
+ rb_include_module(rb_cIO, rb_mReadable);
+ rb_include_module(rb_cIO, rb_mWriteable);
rb_define_alloc_func(rb_cIO, io_alloc);
rb_define_singleton_method(rb_cIO, "new", rb_io_s_new, -1);
Index: ruby.h
===================================================================
RCS file: /src/ruby/ruby.h,v
retrieving revision 1.105
diff -u -r1.105 ruby.h
--- ruby.h 7 Apr 2004 06:30:14 -0000 1.105
+++ ruby.h 19 Jul 2004 12:55:21 -0000
@@ -561,6 +561,8 @@
RUBY_EXTERN VALUE rb_mKernel;
RUBY_EXTERN VALUE rb_mComparable;
RUBY_EXTERN VALUE rb_mEnumerable;
+RUBY_EXTERN VALUE rb_mReadable;
+RUBY_EXTERN VALUE rb_mWriteable;
RUBY_EXTERN VALUE rb_mPrecision;
RUBY_EXTERN VALUE rb_mErrno;
RUBY_EXTERN VALUE rb_mFileTest;
Index: ext/stringio/stringio.c
===================================================================
RCS file: /src/ruby/ext/stringio/stringio.c,v
retrieving revision 1.28
diff -u -r1.28 stringio.c
--- ext/stringio/stringio.c 29 Mar 2004 07:54:24 -0000 1.28
+++ ext/stringio/stringio.c 19 Jul 2004 12:55:30 -0000
@@ -954,6 +954,8 @@
VALUE StringIO = rb_define_class("StringIO", rb_cData);
rb_include_module(StringIO, rb_mEnumerable);
+ rb_include_module(StringIO, rb_mReadable);
+ rb_include_module(StringIO, rb_mWriteable);
rb_define_alloc_func(StringIO, strio_s_allocate);
rb_define_singleton_method(StringIO, "open", strio_s_open, -1);
rb_define_method(StringIO, "initialize", strio_initialize, -1);
Index: ext/zlib/zlib.c
===================================================================
RCS file: /src/ruby/ext/zlib/zlib.c,v
retrieving revision 1.13
diff -u -r1.13 zlib.c
--- ext/zlib/zlib.c 23 Jun 2004 09:19:14 -0000 1.13
+++ ext/zlib/zlib.c 19 Jul 2004 12:55:37 -0000
@@ -3348,6 +3348,8 @@
cGzipWriter = rb_define_class_under(mZlib, "GzipWriter", cGzipFile);
cGzipReader = rb_define_class_under(mZlib, "GzipReader", cGzipFile);
rb_include_module(cGzipReader, rb_mEnumerable);
+ rb_include_module(cGzipReader, rb_mReadable);
+ rb_include_module(cGzipReader, rb_mWriteable);
rb_define_singleton_method(cGzipFile, "wrap", rb_gzfile_s_wrap, -1);
rb_undef_alloc_func(cGzipFile);
Index: lib/readbytes.rb
===================================================================
RCS file: /src/ruby/lib/readbytes.rb,v
retrieving revision 1.2
diff -u -r1.2 readbytes.rb
--- lib/readbytes.rb 13 Aug 1999 05:45:16 -0000 1.2
+++ lib/readbytes.rb 19 Jul 2004 12:55:37 -0000
@@ -1,6 +1,6 @@
# readbytes.rb
#
-# add IO#readbytes, which reads fixed sized data.
+# add Readable#readbytes, which reads fixed sized data.
# it guarantees read data size.
class TruncatedDataError<IOError
@@ -11,7 +11,7 @@
attr_reader :data
end
-class IO
+module Readable
def readbytes(n)
str = read(n)
if str == nil