mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merges r25411 from trunk into ruby_1_9_1.
-- * marshal.c (w_symbol, r_symreal): fixed the order of symbol and its encoding modifier, in order to make the dump readable from 1.8. [ruby-dev:39515] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d50e1bdcd7
commit
0cfb043b45
3 changed files with 11 additions and 3 deletions
|
|
@ -1,3 +1,9 @@
|
|||
Tue Oct 20 17:57:31 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* marshal.c (w_symbol, r_symreal): fixed the order of symbol and
|
||||
its encoding modifier, in order to make the dump readable from
|
||||
1.8. [ruby-dev:39515]
|
||||
|
||||
Mon Aug 10 21:45:26 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* include/ruby/intern.h (rb_path2class): no deprecation.
|
||||
|
|
|
|||
|
|
@ -412,13 +412,13 @@ w_symbol(ID id, struct dump_arg *arg)
|
|||
}
|
||||
w_byte(TYPE_SYMBOL, arg);
|
||||
w_bytes(RSTRING_PTR(sym), RSTRING_LEN(sym), arg);
|
||||
st_add_direct(arg->symbols, id, arg->symbols->num_entries);
|
||||
if (encidx != -1) {
|
||||
struct dump_call_arg c_arg;
|
||||
c_arg.limit = 1;
|
||||
c_arg.arg = arg;
|
||||
w_encoding(sym, 0, &c_arg);
|
||||
}
|
||||
st_add_direct(arg->symbols, id, arg->symbols->num_entries);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1095,7 +1095,9 @@ r_symreal(struct load_arg *arg, int ivar)
|
|||
volatile VALUE s = r_bytes(arg);
|
||||
ID id;
|
||||
int idx = -1;
|
||||
st_index_t n = arg->symbols->num_entries;
|
||||
|
||||
st_insert(arg->symbols, (st_data_t)n, (st_data_t)0);
|
||||
if (ivar) {
|
||||
long num = r_long(arg);
|
||||
while (num-- > 0) {
|
||||
|
|
@ -1106,7 +1108,7 @@ r_symreal(struct load_arg *arg, int ivar)
|
|||
if (idx < 0) idx = rb_usascii_encindex();
|
||||
rb_enc_associate_index(s, idx);
|
||||
id = rb_intern_str(s);
|
||||
st_insert(arg->symbols, arg->symbols->num_entries, id);
|
||||
st_insert(arg->symbols, (st_data_t)n, (st_data_t)id);
|
||||
|
||||
return id;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#define RUBY_VERSION "1.9.1"
|
||||
#define RUBY_PATCHLEVEL 284
|
||||
#define RUBY_PATCHLEVEL 285
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
#define RUBY_VERSION_MINOR 9
|
||||
#define RUBY_VERSION_TEENY 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue