diff options
Diffstat (limited to 'lib/rdoc')
-rw-r--r-- | lib/rdoc/rdoc.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb index 230639fb0c..10daefd5b9 100644 --- a/lib/rdoc/rdoc.rb +++ b/lib/rdoc/rdoc.rb @@ -387,7 +387,7 @@ The internal error was: end if defined? Encoding then - if /coding:\s*([\w-]+)/i =~ content[/\A(?:.*\n){0,2}/] + if /coding[=:]\s*([^\s;]+)/i =~ content[%r"\A(?:#!.*\n)?.*\n"] if enc = ::Encoding.find($1) content.force_encoding(enc) end |