summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-12 07:11:27 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-12 07:11:27 +0000
commit25c7c4a4ded9be28d60c333743e98087c19e3858 (patch)
tree62238a17c42476f30295a53a938a2e94af3b7746 /test
parent1e6308e28d9852dc5f52c3842b1bfffc749cd4ba (diff)
* 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/branches/ruby_1_9_2@27752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_regexp.rb4
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