Bug #1475: ruby -w warns about encoding for the wrong file
http://redmine.ruby-lang.org/issues/show/1475

Author: Eric Hodel
Status: Open, Priority: Normal
ruby -v: ruby 1.9.2dev (2009-05-13 trunk 23418) [i386-darwin9.7.0]

$ cat a.rb
require 'b'
$ cat b.rb
# here is a comment
#
# -*- coding: UTF-8 -*-
$ ruby19 -vw a.rb
ruby 1.9.2dev (2009-05-13 trunk 23418) [i386-darwin9.7.0]
a.rb:1: warning: encoding 'UTF-8' is ignored, valid only in the first line except for shebang line.


----------------------------------------
http://redmine.ruby-lang.org