From 668bd7d992e3157e616ac7a0b0154d8accb17288 Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 21 Dec 2007 05:03:14 +0000 Subject: * 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 --- test/ruby/test_system.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test') 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" } -- cgit v1.2.3