From: Hugh Sasse Staff Elec Eng Date: 2004-04-30T23:10:15+09:00 Subject: Re: Should StringIO support to_str ? Does this patch, as yet untested, provide a sufficient fix? I'm not sure about the correct way to create ChangeLog entries, so hand edited that with an approx time. (I believe I created this against the 1.8 CVS, though I didn't provide an exact release number to the `cvs update -d` command done in the correct dir, so hope it didn't update from the head.) Hugh, meddling in tha affairs of wizards again! --- ruby/ext/stringio/stringio.c.orig 2004-04-30 14:50:00.564980000 +0100 +++ ruby/ext/stringio/stringio.c 2004-04-30 14:53:06.234702000 +0100 @@ -961,6 +961,7 @@ rb_define_method(StringIO, "reopen", strio_reopen, -1); rb_define_method(StringIO, "string", strio_get_string, 0); + rb_define_method(StringIO, "to_str", strio_get_string, 0); rb_define_method(StringIO, "string=", strio_set_string, 1); rb_define_method(StringIO, "lineno", strio_get_lineno, 0); rb_define_method(StringIO, "lineno=", strio_set_lineno, 1); --- ruby/ChangeLog.orig 2004-04-30 14:49:58.523946000 +0100 +++ ruby/ChangeLog 2004-04-30 14:57:14.433008000 +0100 @@ -1,3 +1,7 @@ +Fri Apr 30 15:00:00 2004 Hugh Sasse + + * ext/stringio.stringio.c: aliased string to to_str + Fri Apr 30 20:08:41 2004 WATANABE Hirofumi * time.c (SIZEOF_TIME_T): support SIZEOF_TIME_T == SIZEOF_INT.