summaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authorksaito <ksaito@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-28 03:09:13 +0000
committerksaito <ksaito@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-28 03:09:13 +0000
commit11040d89420cfa290430960f95b6e3bb8361e0a4 (patch)
tree91eb489927947f75436f5bd366896772c6b0c71c /test/ruby
parent010daea0e99135f74b320a52d571d7e6fd7117e5 (diff)
downloadruby-11040d89420cfa290430960f95b6e3bb8361e0a4.tar.gz
ruby-11040d89420cfa290430960f95b6e3bb8361e0a4.tar.xz
ruby-11040d89420cfa290430960f95b6e3bb8361e0a4.zip
* regparse.c, test/ruby/test_regexp.rb: fixed problem with UTF-8 characters that have U+00FE or invalid characters.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_regexp.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb
index 889fbb4b2..dbfe4d7ae 100644
--- a/test/ruby/test_regexp.rb
+++ b/test/ruby/test_regexp.rb
@@ -12,4 +12,16 @@ class TestRegexp < Test::Unit::TestCase
def test_ruby_dev_24887
assert_equal("a".gsub(/a\Z/, ""), "")
end
+
+ def test_yoshidam_net_20041111_1
+ s = "[\xC2\xA0-\xC3\xBE]"
+ assert_match(Regexp.new(s, nil, "u"), "\xC3\xBE")
+ end
+
+ def test_yoshidam_net_20041111_2
+ assert_raise(RegexpError) do
+ s = "[\xFF-\xFF]"
+ Regexp.new(s, nil, "u")
+ end
+ end
end