Merge pull request #2621 from icco/master

Issue with schema dump
This commit is contained in:
Aaron Patterson
2012-03-26 17:24:48 -07:00
parent 0e916ae232
commit 3eb5be67b1

View File

@@ -40,7 +40,7 @@ module ActiveRecord
def header(stream)
define_params = @version ? ":version => #{@version}" : ""
if stream.respond_to?(:external_encoding)
if stream.respond_to?(:external_encoding) && stream.external_encoding
stream.puts "# encoding: #{stream.external_encoding.name}"
end