1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* marshal.c (r_object0): replace \u by u when the regexp is

made by Ruby 1.8. [ruby-dev:36750]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2009-07-09 14:47:22 +00:00
parent d43de333de
commit e6989a7ec2
2 changed files with 17 additions and 2 deletions

View file

@ -1,3 +1,7 @@
Thu Jul 9 21:56:59 2009 NARUSE, Yui <naruse@ruby-lang.org>
* marshal.c (r_object0): replace \u by u when the regexp is
made by Ruby 1.8. [ruby-dev:36750]
Wed Jul 8 23:13:54 2009 Tadayoshi Funaba <tadf@dotrb.org>
* complex.c (nucomp_div): omitted zero division check.
@ -19,7 +23,7 @@ Wed Jul 8 16:47:03 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (rb_file_s_basename): returns new string instead of
shared string from FilePathStringValue(). [ruby-core:24199]
2009-07-07 Eric Hodel <drbrain@segment7.net>
Wed Jul 8 04:28:16 2009 Eric Hodel <drbrain@segment7.net>
* ext/.document: Update with extensions that appear to have
documentation. [ruby-core:24181]

View file

@ -1393,8 +1393,19 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
{
volatile VALUE str = r_bytes(arg);
int options = r_byte(arg);
v = r_entry(rb_reg_new("", 0, options), arg);
if (ivp) {
r_ivar(v, arg);
rb_p(v);
*ivp = Qfalse;
}
rb_enc_copy(str, v);
if (rb_enc_get_index(str) != rb_utf8_encindex()) {
#define f_gsub_bang(x,y,z) rb_funcall(x, rb_intern("gsub!"), 2, y, z)
f_gsub_bang(str, rb_reg_new("\\\\u", 3, 0), rb_usascii_str_new_cstr("u"));
}
v = r_entry(rb_reg_new_str(str, options), arg);
v = r_leave(v, arg);
v = r_leave(v, arg);
}
break;