diff options
| author | Dan Allen <dallen@redhat.com> | 2013-05-01 20:35:56 -0600 |
|---|---|---|
| committer | Dan Allen <dallen@redhat.com> | 2013-05-01 20:35:56 -0600 |
| commit | eee8c4227f68193e01b37cd2dfdfbf4530912db1 (patch) | |
| tree | 64304bcab33b1381dfb06ddbdb4a9f976e47cc20 /lib | |
| parent | 1af784c9d7b741c2b1c012918189af085eb6fbe9 (diff) | |
check Encoding.default_external, not IO#external_encoding
Diffstat (limited to 'lib')
| -rwxr-xr-x | lib/asciidoctor.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/asciidoctor.rb b/lib/asciidoctor.rb index 787f4164..e0f3bfca 100755 --- a/lib/asciidoctor.rb +++ b/lib/asciidoctor.rb @@ -97,7 +97,7 @@ module Asciidoctor # _All_ input data must be force encoded to UTF-8 if Encoding.default_external is *not* UTF-8 # Address failures performing string operations that are reported as "invalid byte sequence in US-ASCII" # Ruby 1.8 doesn't seem to experience this problem (perhaps because it isn't validating the encodings) - FORCE_ENCODING = RUBY_VERSION > '1.9' && File.new(__FILE__).external_encoding != Encoding::UTF_8 + FORCE_ENCODING = RUBY_VERSION > '1.9' && Encoding.default_external != Encoding::UTF_8 # The default document type # Can influence markup generated by render templates |
