mirror of
https://github.com/ruby/ruby.git
synced 2025-09-23 20:44:00 +02:00
* 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
This commit is contained in:
parent
59dca19910
commit
668bd7d992
3 changed files with 9 additions and 1 deletions
|
@ -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"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue