summaryrefslogtreecommitdiff
path: root/sample/test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sample/test.rb')
-rw-r--r--sample/test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/sample/test.rb b/sample/test.rb
index b1560d3105..f3ac9c4a49 100644
--- a/sample/test.rb
+++ b/sample/test.rb
@@ -1931,7 +1931,7 @@ end
def valid_syntax?(code, fname)
p fname
code = code.dup.force_encoding("ascii-8bit")
- code.sub!(/\A(\xef\xbb\xbf)?(\s*\#.*$)*(\n)?/n) {
+ code.sub!(/\A(?:\xef\xbb\xbf)?(\s*\#.*$)*(\n)?/n) {
"#$&#{"\n" if $1 && !$2}BEGIN{throw tag, :ok}\n"
}
code.force_encoding("us-ascii")