diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-21 05:03:14 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-21 05:03:14 +0000 |
commit | 668bd7d992e3157e616ac7a0b0154d8accb17288 (patch) | |
tree | 88293a3d29c63d2aa271109cfb667f10346e03e9 /test/ruby/test_system.rb | |
parent | 59dca1991089e87b21cc9edeadfb33033ffc1e3f (diff) | |
download | ruby-668bd7d992e3157e616ac7a0b0154d8accb17288.tar.gz |
* test/ruby/test_system.rb (TestSystem::valid_syntax): apply
ASCII-8BIT encoding explicitly.
* re.c (rb_reg_prepare_re): add encoding name in the message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_system.rb')
-rw-r--r-- | test/ruby/test_system.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_system.rb b/test/ruby/test_system.rb index 7524b2e7af..403bacab2d 100644 --- a/test/ruby/test_system.rb +++ b/test/ruby/test_system.rb @@ -4,6 +4,7 @@ require 'tmpdir' class TestSystem < Test::Unit::TestCase def valid_syntax?(code, fname) + code.force_encoding("ascii-8bit") code = code.sub(/\A(?:\s*\#.*$)*(\n)?/n) { "#$&#{"\n" if $1 && !$2}BEGIN{return true}\n" } |