mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* string.c (str_new_shared): was setting embedding flag of wrong
string object. [ruby-dev:32685] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
924f5f0f10
commit
65a0050268
2 changed files with 4 additions and 1 deletions
|
@ -11,6 +11,9 @@ Mon Dec 24 02:59:32 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
|||
|
||||
* io.c (prepare_getline_args): convert RS to external encoding.
|
||||
|
||||
* string.c (str_new_shared): was setting embedding flag of wrong
|
||||
string object. [ruby-dev:32685]
|
||||
|
||||
Mon Dec 24 02:06:35 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* io.c (rb_f_open): documentation update.
|
||||
|
|
2
string.c
2
string.c
|
@ -245,7 +245,7 @@ str_new_shared(VALUE klass, VALUE str)
|
|||
VALUE str2 = str_alloc(klass);
|
||||
|
||||
if (RSTRING_LEN(str) <= RSTRING_EMBED_LEN_MAX) {
|
||||
STR_SET_EMBED(str);
|
||||
STR_SET_EMBED(str2);
|
||||
memcpy(RSTRING_PTR(str2), RSTRING_PTR(str), RSTRING_LEN(str)+1);
|
||||
STR_SET_EMBED_LEN(str2, RSTRING_LEN(str));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue