ruby-changes:8283
From: matz <ko1@a...>
Date: Fri, 17 Oct 2008 07:21:26 +0900 (JST)
Subject: [ruby-changes:8283] Ruby:r19811 (trunk): * ruby.c (proc_options): no warning when default_external already
matz 2008-10-17 07:21:09 +0900 (Fri, 17 Oct 2008) New Revision: 19811 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19811 Log: * ruby.c (proc_options): no warning when default_external already set by -E. * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_rubyopt): put -K after -E to set script encoding. Modified files: trunk/ChangeLog trunk/ruby.c trunk/test/ruby/test_rubyoptions.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 19810) +++ ChangeLog (revision 19811) @@ -51,6 +51,14 @@ * instruby.rb (lib): installs all files other than README etc. +Thu Oct 16 08:14:39 2008 Yukihiro Matsumoto <matz@r...> + + * ruby.c (proc_options): no warning when default_external already + set by -E. + + * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_rubyopt): + put -K after -E to set script encoding. + Thu Oct 16 06:20:36 2008 Yukihiro Matsumoto <matz@r...> * test/ruby/test_transcode.rb (TestTranscode#test_errors): Index: ruby.c =================================================================== --- ruby.c (revision 19810) +++ ruby.c (revision 19811) @@ -814,7 +814,8 @@ } if (enc_name) { opt->src.enc.name = rb_str_new2(enc_name); - set_external_encoding_once(opt, enc_name, 0); + if (!opt->ext.enc.name) + opt->ext.enc.name = opt->src.enc.name; } s++; } Index: test/ruby/test_rubyoptions.rb =================================================================== --- test/ruby/test_rubyoptions.rb (revision 19810) +++ test/ruby/test_rubyoptions.rb (revision 19811) @@ -208,8 +208,8 @@ ENV['RUBYOPT'] = '-T4' assert_in_out_err([], "", [], /no program input from stdin allowed in tainted mode \(SecurityError\)/) - ENV['RUBYOPT'] = '-KN -Eus-ascii' - assert_in_out_err(%w(-KU -Eutf-8), "p '\u3042'") do |r, e| + ENV['RUBYOPT'] = '-Eus-ascii -KN' + assert_in_out_err(%w(-Eutf-8 -KU), "p '\u3042'") do |r, e| assert_equal("\"\u3042\"", r.join.force_encoding(Encoding::UTF_8)) assert_equal([], e) end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/