diff options
Diffstat (limited to 'activesupport/lib/active_support/xml_mini')
-rw-r--r-- | activesupport/lib/active_support/xml_mini/rexml.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/xml_mini/rexml.rb b/activesupport/lib/active_support/xml_mini/rexml.rb index 924ed72345..95af5af2c0 100644 --- a/activesupport/lib/active_support/xml_mini/rexml.rb +++ b/activesupport/lib/active_support/xml_mini/rexml.rb @@ -20,11 +20,9 @@ module ActiveSupport data = StringIO.new(data || '') end - char = data.getc - if char.nil? + if data.eof? {} else - data.ungetc(char) silence_warnings { require 'rexml/document' } unless defined?(REXML::Document) doc = REXML::Document.new(data) |