* marshal.c (r_object0): should prepare placeholder before

processing instance variables.  [ruby-dev:40414]

* marshal.c (id2encidx): no longer need arg.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2010-02-24 14:16:59 +00:00
Родитель aba5263254
Коммит 6f828a2437
2 изменённых файлов: 12 добавлений и 5 удалений

Просмотреть файл

@ -50,6 +50,13 @@ Sun Feb 21 06:24:12 2010 Alexander Zavorine <alexandre.zavorine@nokia.com>
* symbian/setup (config.h): HAVE_STRUCT_TIMEZONE, VOID_UNSETENV, and RUBY_LIB_VERSION_STYLE defined.
* symbian/setup (ruby.mmp): SOURCE node.c added.
Sat Feb 20 14:42:19 2010 Yukihiro Matsumoto <matz@ruby-lang.org>
* marshal.c (r_object0): should prepare placeholder before
processing instance variables. [ruby-dev:40414]
* marshal.c (id2encidx): no longer need arg.
Sat Feb 20 14:36:16 2010 Yukihiro Matsumoto <matz@ruby-lang.org>
* vm.c (vm_backtrace_each): use called_id when method definition

Просмотреть файл

@ -1126,7 +1126,7 @@ r_bytes0(long len, struct load_arg *arg)
}
static int
id2encidx(ID id, VALUE val, struct load_arg *arg)
id2encidx(ID id, VALUE val)
{
if (id == rb_id_encoding()) {
int idx = rb_enc_find_index(StringValueCStr(val));
@ -1165,7 +1165,7 @@ r_symreal(struct load_arg *arg, int ivar)
long num = r_long(arg);
while (num-- > 0) {
id = r_symbol(arg);
idx = id2encidx(id, r_object(arg), arg);
idx = id2encidx(id, r_object(arg));
}
}
if (idx < 0) idx = rb_usascii_encindex();
@ -1266,7 +1266,7 @@ r_ivar(VALUE obj, int *has_encoding, struct load_arg *arg)
do {
ID id = r_symbol(arg);
VALUE val = r_object(arg);
int idx = id2encidx(id, val, arg);
int idx = id2encidx(id, val);
if (idx >= 0) {
rb_enc_associate_index(obj, idx);
if (has_encoding) *has_encoding = TRUE;
@ -1494,8 +1494,8 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
volatile VALUE str = r_bytes(arg);
int options = r_byte(arg);
int has_encoding = FALSE;
st_index_t idx = r_prepare(arg);
v = r_entry(rb_reg_alloc(), arg);
if (ivp) {
r_ivar(str, &has_encoding, arg);
*ivp = FALSE;
@ -1519,7 +1519,7 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
}
rb_str_set_len(str, dst - ptr);
}
v = rb_reg_init_str(v, str, options);
v = r_entry0(rb_reg_new_str(str, options), idx, arg);
v = r_leave(v, arg);
}
break;