mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_regexp.rb (test_dup_warn): read in UTF-8
encoding regardless environment. * test/ruby/envutil.rb (invoke_ruby): add encoding option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b05d8841fc
commit
b053b97809
4 changed files with 18 additions and 5 deletions
|
@ -1,3 +1,10 @@
|
|||
Wed Jun 23 12:44:47 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* test/ruby/test_regexp.rb (test_dup_warn): read in UTF-8
|
||||
encoding regardless environment.
|
||||
|
||||
* test/ruby/envutil.rb (invoke_ruby): add encoding option.
|
||||
|
||||
Tue Jun 22 23:10:10 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* time.c (num_exact): fix for mathn. [ruby-dev:41599]
|
||||
|
|
|
@ -76,6 +76,10 @@ module EnvUtil
|
|||
opt[:in] = in_c
|
||||
opt[:out] = out_c if capture_stdout
|
||||
opt[:err] = err_c if capture_stderr
|
||||
if enc = opt.delete(:encoding)
|
||||
out_p.set_encoding(enc) if out_p
|
||||
err_p.set_encoding(enc) if err_p
|
||||
end
|
||||
case args.first
|
||||
when Hash
|
||||
child_env = [args.shift]
|
||||
|
|
|
@ -819,9 +819,11 @@ class TestRegexp < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_dup_warn
|
||||
assert_in_out_err('-w', 'x=/[\u3042\u3041]/', [], /\A\z/)
|
||||
assert_in_out_err('-w', 'x=/[\u3042\u3042]/', [], /duplicated/)
|
||||
assert_in_out_err('-w', 'x=/[\u3042\u3041-\u3043]/', [], /duplicated/)
|
||||
assert_in_out_err(%w/-w -U/, "#coding:utf-8\nx=/[\u3042\u3041]/\n!x", [], [])
|
||||
assert_in_out_err(%w/-w -U/, "#coding:utf-8\nx=/[\u3042\u3042]/\n!x", [], /duplicated/u, nil,
|
||||
encoding: Encoding::UTF_8)
|
||||
assert_in_out_err(%w/-w -U/, "#coding:utf-8\nx=/[\u3042\u3041-\u3043]/\n!x", [], /duplicated/u, nil,
|
||||
encoding: Encoding::UTF_8)
|
||||
end
|
||||
|
||||
def test_property_warn
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#define RUBY_VERSION "1.9.2"
|
||||
#define RUBY_RELEASE_DATE "2010-06-22"
|
||||
#define RUBY_RELEASE_DATE "2010-06-23"
|
||||
#define RUBY_PATCHLEVEL -1
|
||||
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
|
@ -7,7 +7,7 @@
|
|||
#define RUBY_VERSION_TEENY 1
|
||||
#define RUBY_RELEASE_YEAR 2010
|
||||
#define RUBY_RELEASE_MONTH 6
|
||||
#define RUBY_RELEASE_DAY 22
|
||||
#define RUBY_RELEASE_DAY 23
|
||||
|
||||
#include "ruby/version.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue