From 7b40e69d7fb8e8a623ef6e65c127f15570b549e4 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 4 Oct 2007 07:16:04 +0000 Subject: * parse.y (reg_compile_gen): copy encoding from source string. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 1 + 1 file changed, 1 insertion(+) (limited to 'parse.y') diff --git a/parse.y b/parse.y index b3c3bc98f..b81e37ee0 100644 --- a/parse.y +++ b/parse.y @@ -8170,6 +8170,7 @@ reg_compile_gen(struct parser_params* parser, VALUE str, int options) compile_error(PARSER_ARG "%s", RSTRING_PTR(re)); return Qnil; } + rb_enc_copy(re, str); return re; } -- cgit