diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-12 01:06:24 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-12 01:06:24 +0000 |
commit | 0e586b35b80985097489c68e8085457d91165696 (patch) | |
tree | f8591c9934ab873db13a2f37dbee6ebe6067516f /test/ruby/test_regexp.rb | |
parent | 01cd3467fbd3e9ea212063d0a7405642b8746b94 (diff) | |
download | ruby-0e586b35b80985097489c68e8085457d91165696.tar.gz |
* re.c (rb_reg_initialize_m): fix wrong index for the lang
option's value 'N'. reported by Masaya TARUI via IRC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_regexp.rb')
-rw-r--r-- | test/ruby/test_regexp.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb index 00c2ddb5e9..888a0cb9e5 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -286,6 +286,10 @@ class TestRegexp < Test::Unit::TestCase assert_equal("bar", "foobarbaz"[Regexp.new("b..", nil, "n")]) assert_equal(//n, Regexp.new("", nil, "n")) + arg_encoding_none = 32 # ARG_ENCODING_NONE is implementation defined value + assert_equal(arg_encoding_none, Regexp.new("", nil, "n").options) + assert_equal(arg_encoding_none, Regexp.new("", nil, "N").options) + assert_raise(RegexpError) { Regexp.new(")(") } end |