diff options
Diffstat (limited to 'lib/rexml/source.rb')
-rw-r--r-- | lib/rexml/source.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/rexml/source.rb b/lib/rexml/source.rb index d4335138a1..3f6d4ffa26 100644 --- a/lib/rexml/source.rb +++ b/lib/rexml/source.rb @@ -69,9 +69,9 @@ module REXML # usual scan() method. For one thing, the pattern argument has some # requirements; for another, the source can be consumed. You can easily # confuse this method. Originally, the patterns were easier - # to construct and this method more robust, because this method - # generated search regexes on the fly; however, this was - # computationally expensive and slowed down the entire REXML package + # to construct and this method more robust, because this method + # generated search regexes on the fly; however, this was + # computationally expensive and slowed down the entire REXML package # considerably, since this is by far the most commonly called method. # @param pattern must be a Regexp, and must be in the form of # /^\s*(#{your pattern, with no groups})(.*)/. The first group @@ -194,7 +194,7 @@ module REXML def read begin str = @source.readline(@line_break) - str = decode(str) if @to_utf and str + str = decode(str) if @to_utf and str @buffer << str if not @to_utf and @buffer.respond_to? :force_encoding @buffer.force_encoding Encoding::UTF_8 @@ -225,7 +225,7 @@ module REXML rv.taint rv end - + def empty? super and ( @source.nil? || @source.eof? ) end |