summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-25 00:33:11 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-25 00:33:11 +0000
commita8c0ad5b028620e01d78b520849f157d59830028 (patch)
treeb1bb03c0250b0a045ec17d500a6820bf279911e6 /lib
parentcd09870a9676b72190b1584429ce9ff9ed2f0657 (diff)
downloadruby-a8c0ad5b028620e01d78b520849f157d59830028.tar.gz
ruby-a8c0ad5b028620e01d78b520849f157d59830028.tar.xz
ruby-a8c0ad5b028620e01d78b520849f157d59830028.zip
* lib/erb.rb (ERB::Compiler#compile): output magic comment.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/erb.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/erb.rb b/lib/erb.rb
index 2c7e20392..c6e912912 100644
--- a/lib/erb.rb
+++ b/lib/erb.rb
@@ -518,6 +518,7 @@ class ERB
def compile(s)
out = Buffer.new(self)
+ out.push("# -*- coding: #{s.encoding} -*-")
content = ''
scanner = make_scanner(s)