diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | io.c | 2 | ||||
-rw-r--r-- | pack.c | 2 |
3 files changed, 10 insertions, 2 deletions
@@ -1,3 +1,11 @@ +Thu Oct 7 12:55:04 2004 Yukihiro Matsumoto <matz@ruby-lang.org> + + * pack.c (pack_unpack): string conversion should at the top of the + method. [ruby-dev:24439] + + * io.c (io_read): buffer should be frozen only after the length + check. [ruby-dev:24440] + Thu Oct 7 02:56:43 2004 Nobuyoshi Nakada <nobu@ruby-lang.org> * ext/stringio/stringio.c: use FMODE_APPEND. @@ -1195,10 +1195,10 @@ io_read(argc, argv, io) rb_str_modify(str); rb_str_resize(str,len); } - FL_SET(str, FL_FREEZE); if (len == 0) return str; READ_CHECK(fptr->f); + FL_SET(str, FL_FREEZE); n = rb_io_fread(RSTRING(str)->ptr, len, fptr->f); FL_UNSET(str, FL_FREEZE); if (n == 0) { @@ -1311,9 +1311,9 @@ pack_unpack(str, fmt) #endif StringValue(str); + StringValue(fmt); s = RSTRING(str)->ptr; send = s + RSTRING(str)->len; - StringValue(fmt); p = RSTRING(fmt)->ptr; pend = p + RSTRING(fmt)->len; |