aboutsummaryrefslogtreecommitdiffstats
path: root/test/ripper
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-01 17:53:02 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-01 17:53:02 +0000
commit11dc42c20ca3cf3be6003fa303eb5649c00ab411 (patch)
tree0c0aca91ce1d065b1c607197f0c5e6f9d999c416 /test/ripper
parent689f0dd2af0e92e895afbc3d9fd2e4cb0bc3f46b (diff)
downloadruby-11dc42c20ca3cf3be6003fa303eb5649c00ab411.tar.gz
parse.y: enable encoding pragma in ripper
* parse.y (magic_comment_encoding): enable in ripper, since the encoding is necessary to parse non-default encoding scripts. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ripper')
-rw-r--r--test/ripper/test_ripper.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ripper/test_ripper.rb b/test/ripper/test_ripper.rb
index 0b50bee2c0..1544e5682f 100644
--- a/test/ripper/test_ripper.rb
+++ b/test/ripper/test_ripper.rb
@@ -21,6 +21,9 @@ class TestRipper::Ripper < Test::Unit::TestCase
ripper = Ripper.new('# coding: iso-8859-15')
ripper.parse
assert_equal Encoding::ISO_8859_15, ripper.encoding
+ ripper = Ripper.new('# -*- coding: iso-8859-15 -*-')
+ ripper.parse
+ assert_equal Encoding::ISO_8859_15, ripper.encoding
end
def test_end_seen_eh