summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-03-23 17:20:19 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-03-23 17:20:19 +0900
commit607aa11711a7975540e1d71c2616ae5533feb35a (patch)
treec6280968bc8913e0c25e54696e2cfb80ecb4360b /test
parenta58f9aa3504f4057950fb858ea54b28d954f947f (diff)
Ignore useless separators preceding a file encoding comment
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_parse.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb
index 3f2deabedd..493042ef67 100644
--- a/test/ruby/test_parse.rb
+++ b/test/ruby/test_parse.rb
@@ -692,6 +692,14 @@ x = __ENCODING__
x = __ENCODING__
END
end
+
+ assert_nothing_raised do
+ eval <<-END, nil, __FILE__, __LINE__+1
+# xxxx : coding sjis
+x = __ENCODING__
+ END
+ end
+ assert_equal(__ENCODING__, x)
end
def test_utf8_bom