mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* array.c (rb_ary_replace): use ptr and len of orig instead of
shared. fixed: [ruby-dev:30116] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
42b298560b
commit
82e937f511
3 changed files with 15 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Wed Jan 10 00:10:23 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* array.c (rb_ary_replace): use ptr and len of orig instead of
|
||||||
|
shared. fixed: [ruby-dev:30116]
|
||||||
|
|
||||||
Tue Jan 9 12:29:20 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Jan 9 12:29:20 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* ext/etc/etc.c (etc_getpwuid, etc_getgrgid): fix to correctly
|
* ext/etc/etc.c (etc_getpwuid, etc_getgrgid): fix to correctly
|
||||||
|
|
12
array.c
12
array.c
|
@ -2090,15 +2090,17 @@ rb_ary_replace(VALUE copy, VALUE orig)
|
||||||
VALUE shared;
|
VALUE shared;
|
||||||
VALUE *ptr;
|
VALUE *ptr;
|
||||||
|
|
||||||
rb_ary_modify(copy);
|
|
||||||
ary_iter_check(copy);
|
|
||||||
orig = to_ary(orig);
|
orig = to_ary(orig);
|
||||||
|
rb_ary_modify_check(copy);
|
||||||
|
ary_iter_check(copy);
|
||||||
if (copy == orig) return copy;
|
if (copy == orig) return copy;
|
||||||
shared = ary_make_shared(orig);
|
shared = ary_make_shared(orig);
|
||||||
ptr = RARRAY(copy)->ptr;
|
if (!ARY_SHARED_P(copy)) {
|
||||||
|
ptr = RARRAY(copy)->ptr;
|
||||||
xfree(ptr);
|
xfree(ptr);
|
||||||
RARRAY(copy)->ptr = RARRAY(shared)->ptr;
|
}
|
||||||
RARRAY(copy)->len = RARRAY(shared)->len;
|
RARRAY(copy)->ptr = RARRAY(orig)->ptr;
|
||||||
|
RARRAY(copy)->len = RARRAY(orig)->len;
|
||||||
RARRAY(copy)->aux.shared = shared;
|
RARRAY(copy)->aux.shared = shared;
|
||||||
FL_SET(copy, ELTS_SHARED);
|
FL_SET(copy, ELTS_SHARED);
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#define RUBY_VERSION "1.9.0"
|
#define RUBY_VERSION "1.9.0"
|
||||||
#define RUBY_RELEASE_DATE "2007-01-09"
|
#define RUBY_RELEASE_DATE "2007-01-10"
|
||||||
#define RUBY_VERSION_CODE 190
|
#define RUBY_VERSION_CODE 190
|
||||||
#define RUBY_RELEASE_CODE 20070109
|
#define RUBY_RELEASE_CODE 20070110
|
||||||
#define RUBY_PATCHLEVEL 0
|
#define RUBY_PATCHLEVEL 0
|
||||||
|
|
||||||
#define RUBY_VERSION_MAJOR 1
|
#define RUBY_VERSION_MAJOR 1
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
#define RUBY_VERSION_TEENY 0
|
#define RUBY_VERSION_TEENY 0
|
||||||
#define RUBY_RELEASE_YEAR 2007
|
#define RUBY_RELEASE_YEAR 2007
|
||||||
#define RUBY_RELEASE_MONTH 1
|
#define RUBY_RELEASE_MONTH 1
|
||||||
#define RUBY_RELEASE_DAY 9
|
#define RUBY_RELEASE_DAY 10
|
||||||
|
|
||||||
RUBY_EXTERN const char ruby_version[];
|
RUBY_EXTERN const char ruby_version[];
|
||||||
RUBY_EXTERN const char ruby_release_date[];
|
RUBY_EXTERN const char ruby_release_date[];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue