diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | io.c | 5 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 9 insertions, 2 deletions
@@ -1,3 +1,7 @@ +Tue Dec 7 22:37:15 2010 Masaya Tarui <tarui@ruby-lnag.org> + + * io.c (io_read): duplicate string if shared. [ruby-dev:42719] + Tue Dec 7 21:59:37 2010 Kouhei Sutou <kou@cozmixng.org> * lib/rexml/light/node.rb: remove circular require. @@ -2157,7 +2157,10 @@ io_read(int argc, VALUE *argv, VALUE io) rb_scan_args(argc, argv, "02", &length, &str); if (NIL_P(length)) { - if (!NIL_P(str)) StringValue(str); + if (!NIL_P(str)){ + StringValue(str); + rb_str_modify(str); + } GetOpenFile(io, fptr); rb_io_check_char_readable(fptr); return read_all(fptr, remain_size(fptr), str); @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_PATCHLEVEL 122 +#define RUBY_PATCHLEVEL 123 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 |