mkxp/patches/ruby/marshal_utf8.patch

16 lines
340 B
Diff
Raw Normal View History

2013-10-19 17:00:08 +00:00
diff --git a/marshal.c b/marshal.c
index 4cba05d..dfce6ee 100644
--- a/marshal.c
+++ b/marshal.c
@@ -1312,7 +1312,9 @@ r_unique(struct load_arg *arg)
static VALUE
r_string(struct load_arg *arg)
{
- return r_bytes(arg);
+ VALUE str = r_bytes(arg);
+ rb_enc_associate(str, rb_utf8_encoding());
+ return str;
}
static VALUE