Skip to content

Commit

Permalink
Clarify variable name (ruby#218)
Browse files Browse the repository at this point in the history
Co-authored-by: Olle Jonsson <[email protected]>
  • Loading branch information
kevinebaugh and olleolleolle authored Oct 30, 2024
1 parent 8ef7502 commit 519ae6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rexml/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def initialize(arg, encoding=nil)
detect_encoding
end
@line = 0
@term_encord = {}
@encoded_terms = {}
end

# The current buffer (what we're going to read next)
Expand Down Expand Up @@ -246,7 +246,7 @@ def read(term = nil, min_bytes = 1)

def read_until(term)
pattern = Private::PRE_DEFINED_TERM_PATTERNS[term] || /#{Regexp.escape(term)}/
term = @term_encord[term] ||= encode(term)
term = @encoded_terms[term] ||= encode(term)
until str = @scanner.scan_until(pattern)
break if @source.nil?
break if @source.eof?
Expand Down

0 comments on commit 519ae6c

Please sign in to comment.