summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-23 12:45:26 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-23 12:45:26 +0000
commit243faf286f072f0c45d353e03effc0a531e5df52 (patch)
tree6b1c80c10ce5aa4ed6977e79252d618bb533f900
parent929bdcabf7a292da3e1bedab97926f7d932d2d64 (diff)
merges r30122 from trunk into ruby_1_9_2.
-- * io.c (io_read): duplicate string if shared. [ruby-dev:42719] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--io.c5
-rw-r--r--version.h2
3 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 2e9c65f888..852f43a1c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/io.c b/io.c
index 79c3024538..474562a944 100644
--- a/io.c
+++ b/io.c
@@ -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);
diff --git a/version.h b/version.h
index d96f840a0d..556c99046b 100644
--- a/version.h
+++ b/version.h
@@ -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