diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-21 15:57:26 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-21 15:57:26 +0000 |
| commit | b93e3af238b3d3890cfda61200b6018a2484a138 (patch) | |
| tree | b9cd5c093c97e330fa6abde26ce7f169aae132a8 /sample | |
| parent | 402b4240388d0206a2fa83826a8b6f9da216416b (diff) | |
| download | ruby-b93e3af238b3d3890cfda61200b6018a2484a138.tar.gz ruby-b93e3af238b3d3890cfda61200b6018a2484a138.tar.xz ruby-b93e3af238b3d3890cfda61200b6018a2484a138.zip | |
* sample/test.rb (valid_syntax): force_encoding input script.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
| -rw-r--r-- | sample/test.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sample/test.rb b/sample/test.rb index a9940039c..52898d582 100644 --- a/sample/test.rb +++ b/sample/test.rb @@ -1866,6 +1866,7 @@ end def valid_syntax?(code, fname) p fname + code.force_encoding("ascii-8bit") code = code.sub(/\A(?:\s*\#.*$)*(\n)?/n) { "#$&#{"\n" if $1 && !$2}BEGIN{return true}\n" } |
