magic comment

るびま

この記事読んで

#!/bin/env ruby
# -*- coding: UTF-8 -*-
puts "Emacs 風"

っていうファイル作ってセーブしようとしたら

Warning (:warning): Invalid coding system `UTF-8' is specified
for the current buffer/file by the :coding tag.
It is highly recommended to fix it before writing to a file.

ってEmacsに怒られた(Emacs23)。

色々試した結果

# -*- coding: utf-8 -*-

エンコーディングの指定を小文字にすると解決。