summaryrefslogtreecommitdiff
path: root/lib/rexml/parsers
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rexml/parsers')
-rw-r--r--lib/rexml/parsers/baseparser.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/rexml/parsers/baseparser.rb b/lib/rexml/parsers/baseparser.rb
index 025d43db54..92033a9c2b 100644
--- a/lib/rexml/parsers/baseparser.rb
+++ b/lib/rexml/parsers/baseparser.rb
@@ -166,7 +166,7 @@ module REXML
return [ :end_element, x ]
end
return @stack.shift if @stack.size > 0
- @source.read if @source.buffer.size==0
+ @source.read if @source.buffer.size<2
if @document_status == nil
@source.consume( /^\s*/um )
word = @source.match( /(<[^>]*)>/um )
@@ -199,7 +199,7 @@ module REXML
args = [ :start_doctype, name, pub_sys, long_name, uri ]
if close == ">"
@document_status = :after_doctype
- @source.read if @source.buffer.size==0
+ @source.read if @source.buffer.size<2
md = @source.match(/^\s*/um, true)
@stack << [ :end_doctype ]
else
@@ -208,7 +208,7 @@ module REXML
return args
else
@document_status = :after_doctype
- @source.read if @source.buffer.size==0
+ @source.read if @source.buffer.size<2
md = @source.match(/\s*/um, true)
end
end