diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-03 09:06:19 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-03 09:06:19 +0000 |
commit | 8f86f5d691be7419eed21ec45b2e23d20c53c259 (patch) | |
tree | 775eb63a268092fdc8a74f1a1b7e59454f6e49e3 /ruby.c | |
parent | b30bbc38fcb0a47f72d683bcc7037194faf57f3b (diff) | |
download | ruby-8f86f5d691be7419eed21ec45b2e23d20c53c259.tar.gz |
* ruby.c (process_options): need to duplicate path before passing it to
rb_str_conv_enc() because the function might call rb_enc_associate()
internally. this fixes test failures on Windows introduced at r55260.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r-- | ruby.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1568,7 +1568,7 @@ process_options(int argc, char **argv, struct cmdline_options *opt) VALUE path = RARRAY_AREF(load_path, i); int mark = rb_attr_get(path, id_initial_load_path_mark) == path; #if UTF8_PATH - path = rb_str_conv_enc(path, uenc, lenc); + path = rb_str_conv_enc(rb_str_dup(path), uenc, lenc); #else path = rb_enc_associate(rb_str_dup(path), lenc); #endif |