diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-26 21:01:52 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-26 21:01:52 +0000 |
| commit | 7553c7f01e630be37e11d59616a7949299a8831b (patch) | |
| tree | 487c2de08190f7548d631b09b42aecc4c1239a15 /test/ruby | |
| parent | 88ab7fae6605d24603d244cee2b312e3fc5e92be (diff) | |
| download | ruby-7553c7f01e630be37e11d59616a7949299a8831b.tar.gz ruby-7553c7f01e630be37e11d59616a7949299a8831b.tar.xz ruby-7553c7f01e630be37e11d59616a7949299a8831b.zip | |
* re.c (rb_reg_preprocess): force fixed encoding when ASCII
incompatible source string.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_utf16.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_utf16.rb b/test/ruby/test_utf16.rb index 0a4bd4586..aeb9cea13 100644 --- a/test/ruby/test_utf16.rb +++ b/test/ruby/test_utf16.rb @@ -115,4 +115,10 @@ class TestUTF16 < Test::Unit::TestCase def test_regexp_union enccall(Regexp, :union, "aa".force_encoding("utf-16be"), "bb".force_encoding("utf-16be")) end + + def test_empty_regexp + s = "".force_encoding("utf-16be") + assert_equal(Encoding.find("utf-16be"), Regexp.new(s).encoding, + "Regexp.new(#{encdump s}).encoding") + end end |
