diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-14 03:34:12 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-14 03:34:12 +0000 |
commit | ec4756f633d62223cb05b5f24aee0842a471fb9d (patch) | |
tree | 7622c68cfae09cbe073b2a7bf778020dbe5b33aa /test | |
parent | 8435c6bb8cd2bedcd95cd5dcc4e5a75ded79735d (diff) |
* re.c (rb_reg_preprocess_dregexp): use non-preprocessed regexp source
for result.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_m17n.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index deb20d52f5..2d48580ba1 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -452,6 +452,12 @@ class TestM17N < Test::Unit::TestCase assert_raise(ArgumentError) { /\xc2\xa1#{r}/s } end + def test_regexp_embed_preprocess + r1 = /\xa4\xa2/e + r2 = /#{r1}/ + assert(r2.source.include?(r1.source)) + end + def test_begin_end_offset str = e("\244\242\244\244\244\246\244\250\244\252a") assert(/(a)/ =~ str) |