Changeset 136

Show
Ignore:
Timestamp:
04/09/2007 11:44:51 (20 months ago)
Author:
why
Message:
  • lib/hpricot/parse.rb: conflict between two variables, both named trans. see #74.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/hpricot/parse.rb

    r130 r136  
    3030    end 
    3131 
    32     trans = opts[:xml] ? :to_s : :downcase 
     32    conv = opts[:xml] ? :to_s : :downcase 
    3333 
    3434    fragment = 
     
    5151      Hpricot.scan(input) do |token| 
    5252        if stack.last[5] == :CDATA and ![:procins, :comment, :cdata].include?(token[0]) and 
    53             !(token[0] == :etag and token[1].send(trans) == stack.last[0]) 
     53            !(token[0] == :etag and token[1].send(conv) == stack.last[0]) 
    5454          token[0] = :text 
    5555          token[1] = token[3] if token[3] 
     
    6262          end 
    6363 
    64           stagname = token[0] = token[1].send(trans) 
     64          stagname = token[0] = token[1].send(conv) 
    6565          if ElementContent[stagname] == :EMPTY and !opts[:xml] 
    6666            token[0] = :emptytag 
     
    115115          end 
    116116        when :etag 
    117           etagname = token[0] = token[1].send(trans) 
     117          etagname = token[0] = token[1].send(conv) 
    118118          if opts[:xhtml_strict] and not ElementContent.has_key? etagname 
    119119            etagname = token[0] = "div"