mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* lib/cgi/core.rb: remove unused variables.
* lib/erb.rb: ditto. * lib/mkmf.rb: ditto. * lib/net/http/response.rb: ditto. * lib/optparse/version.rb: ditto. * lib/prime.rb: ditto. * lib/racc/parser.rb: ditto. * lib/rexml/document.rb: ditto. * lib/rexml/dtd/dtd.rb: ditto. * lib/rexml/element.rb: ditto. * lib/rexml/functions.rb: ditto. * lib/rexml/parsers/xpathparser.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									42425c89a4
								
							
						
					
					
						commit
						448c87008e
					
				
					 13 changed files with 23 additions and 20 deletions
				
			
		
							
								
								
									
										15
									
								
								ChangeLog
									
										
									
									
									
								
							
							
						
						
									
										15
									
								
								ChangeLog
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1,3 +1,18 @@
 | 
			
		|||
Sun Jul 27 19:49:36 2014  SHIBATA Hiroshi  <shibata.hiroshi@gmail.com>
 | 
			
		||||
 | 
			
		||||
	* lib/cgi/core.rb: remove unused variables.
 | 
			
		||||
	* lib/erb.rb: ditto.
 | 
			
		||||
	* lib/mkmf.rb: ditto.
 | 
			
		||||
	* lib/net/http/response.rb: ditto.
 | 
			
		||||
	* lib/optparse/version.rb: ditto.
 | 
			
		||||
	* lib/prime.rb: ditto.
 | 
			
		||||
	* lib/racc/parser.rb: ditto.
 | 
			
		||||
	* lib/rexml/document.rb: ditto.
 | 
			
		||||
	* lib/rexml/dtd/dtd.rb: ditto.
 | 
			
		||||
	* lib/rexml/element.rb: ditto.
 | 
			
		||||
	* lib/rexml/functions.rb: ditto.
 | 
			
		||||
	* lib/rexml/parsers/xpathparser.rb: ditto.
 | 
			
		||||
 | 
			
		||||
Sun Jul 27 05:11:21 2014  Zachary Scott  <e@zzak.io>
 | 
			
		||||
 | 
			
		||||
	* lib/irb.rb: [DOC] PROMPT_I cannot be nil, patch by @hgillane
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -479,7 +479,6 @@ class CGI
 | 
			
		|||
      @files = {}
 | 
			
		||||
      boundary_rexp = /--#{Regexp.quote(boundary)}(#{EOL}|--)/
 | 
			
		||||
      boundary_size = "#{EOL}--#{boundary}#{EOL}".bytesize
 | 
			
		||||
      boundary_end  = nil
 | 
			
		||||
      buf = ''
 | 
			
		||||
      bufsize = 10 * 1024
 | 
			
		||||
      max_count = MAX_MULTIPART_COUNT
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -717,7 +717,7 @@ class ERB
 | 
			
		|||
        comment = $1 if comment[/-\*-\s*(.*?)\s*-*-$/]
 | 
			
		||||
        if %r"coding\s*[=:]\s*([[:alnum:]\-_]+)" =~ comment
 | 
			
		||||
          enc = $1.sub(/-(?:mac|dos|unix)/i, '')
 | 
			
		||||
          enc = Encoding.find(enc)
 | 
			
		||||
          Encoding.find(enc)
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -667,7 +667,6 @@ SRC
 | 
			
		|||
        return nil
 | 
			
		||||
      end
 | 
			
		||||
      upper = 1
 | 
			
		||||
      lower = 0
 | 
			
		||||
      until try_static_assert("#{const} <= #{upper}", headers, opt)
 | 
			
		||||
        lower = upper
 | 
			
		||||
        upper <<= 1
 | 
			
		||||
| 
						 | 
				
			
			@ -2253,7 +2252,7 @@ static: $(STATIC_LIB)#{$extout ? " install-rb" : ""}
 | 
			
		|||
      fseprepl = proc {|s|
 | 
			
		||||
        s = s.gsub("/", fsep)
 | 
			
		||||
        s = s.gsub(/(\$\(\w+)(\))/) {$1+sep+$2}
 | 
			
		||||
        s = s.gsub(/(\$\{\w+)(\})/) {$1+sep+$2}
 | 
			
		||||
        s.gsub(/(\$\{\w+)(\})/) {$1+sep+$2}
 | 
			
		||||
      }
 | 
			
		||||
      rsep = ":#{fsep}=/"
 | 
			
		||||
    else
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -306,7 +306,6 @@ class Net::HTTPResponse
 | 
			
		|||
  # See RFC 2616 section 3.6.1 for definitions
 | 
			
		||||
 | 
			
		||||
  def read_chunked(dest, chunk_data_io) # :nodoc:
 | 
			
		||||
    len = nil
 | 
			
		||||
    total = 0
 | 
			
		||||
    while true
 | 
			
		||||
      line = @socket.readline
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -51,7 +51,7 @@ class << OptionParser
 | 
			
		|||
      raise NameError, path unless Module === klass
 | 
			
		||||
      klass.constants.grep(/#{name}/i) do |c|
 | 
			
		||||
        klass.const_defined?(c) or next
 | 
			
		||||
        c = klass.const_get(c)
 | 
			
		||||
        klass.const_get(c)
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -180,7 +180,7 @@ class Prime
 | 
			
		|||
  #   Prime.int_from_prime_division([[2,2], [3,1]])  #=> 12
 | 
			
		||||
  def int_from_prime_division(pd)
 | 
			
		||||
    pd.inject(1){|value, (prime, index)|
 | 
			
		||||
      value *= prime**index
 | 
			
		||||
      value * prime**index
 | 
			
		||||
    }
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -380,7 +380,6 @@ module Racc
 | 
			
		|||
      _,   _, _, _,
 | 
			
		||||
      _,   _, _, shift_n,  reduce_n,
 | 
			
		||||
      _,   _, * = arg
 | 
			
		||||
      nerr = 0   # tmp
 | 
			
		||||
 | 
			
		||||
      if act > 0 and act < shift_n
 | 
			
		||||
        #
 | 
			
		||||
| 
						 | 
				
			
			@ -431,7 +430,6 @@ module Racc
 | 
			
		|||
        case @racc_error_status
 | 
			
		||||
        when 0
 | 
			
		||||
          unless arg[21]    # user_yyerror
 | 
			
		||||
            nerr += 1
 | 
			
		||||
            on_error @racc_t, @racc_val, @racc_vstack
 | 
			
		||||
          end
 | 
			
		||||
        when 3
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -123,7 +123,7 @@ module REXML
 | 
			
		|||
    def xml_decl
 | 
			
		||||
      rv = @children[0]
 | 
			
		||||
      return rv if rv.kind_of? XMLDecl
 | 
			
		||||
      rv = @children.unshift(XMLDecl.default)[0]
 | 
			
		||||
      @children.unshift(XMLDecl.default)[0]
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    # @return the XMLDecl version of this document as a String.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -24,23 +24,18 @@ module REXML
 | 
			
		|||
          case input
 | 
			
		||||
          when ElementDecl.PATTERN_RE
 | 
			
		||||
            match = $&
 | 
			
		||||
            source = $'
 | 
			
		||||
            contents << ElementDecl.new( match )
 | 
			
		||||
          when AttlistDecl.PATTERN_RE
 | 
			
		||||
            matchdata = $~
 | 
			
		||||
            source = $'
 | 
			
		||||
            contents << AttlistDecl.new( matchdata )
 | 
			
		||||
          when EntityDecl.PATTERN_RE
 | 
			
		||||
            matchdata = $~
 | 
			
		||||
            source = $'
 | 
			
		||||
            contents << EntityDecl.new( matchdata )
 | 
			
		||||
          when Comment.PATTERN_RE
 | 
			
		||||
            matchdata = $~
 | 
			
		||||
            source = $'
 | 
			
		||||
            contents << Comment.new( matchdata )
 | 
			
		||||
          when NotationDecl.PATTERN_RE
 | 
			
		||||
            matchdata = $~
 | 
			
		||||
            source = $'
 | 
			
		||||
            contents << NotationDecl.new( matchdata )
 | 
			
		||||
          end
 | 
			
		||||
        end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1181,9 +1181,8 @@ module REXML
 | 
			
		|||
        prefix = '' unless prefix
 | 
			
		||||
      end
 | 
			
		||||
      old = fetch(name, nil)
 | 
			
		||||
      attr = nil
 | 
			
		||||
      if old.kind_of? Hash # the supplied attribute is one of many
 | 
			
		||||
        attr = old.delete(prefix)
 | 
			
		||||
        old.delete(prefix)
 | 
			
		||||
        if old.size == 1
 | 
			
		||||
          repl = nil
 | 
			
		||||
          old.each_value{|v| repl = v}
 | 
			
		||||
| 
						 | 
				
			
			@ -1192,7 +1191,6 @@ module REXML
 | 
			
		|||
      elsif old.nil?
 | 
			
		||||
        return @element
 | 
			
		||||
      else # the supplied attribute is a top-level one
 | 
			
		||||
        attr = old
 | 
			
		||||
        super(name)
 | 
			
		||||
      end
 | 
			
		||||
      @element
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -363,7 +363,7 @@ module REXML
 | 
			
		|||
 | 
			
		||||
    def Functions::sum( nodes )
 | 
			
		||||
      nodes = [nodes] unless nodes.kind_of? Array
 | 
			
		||||
      nodes.inject(0) { |r,n| r += number(string(n)) }
 | 
			
		||||
      nodes.inject(0) { |r,n| r + number(string(n)) }
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    def Functions::floor( number )
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -21,7 +21,7 @@ module REXML
 | 
			
		|||
        path.gsub!(/([\(\[])\s+/, '\1') # Strip ignorable spaces
 | 
			
		||||
        path.gsub!( /\s+([\]\)])/, '\1')
 | 
			
		||||
        parsed = []
 | 
			
		||||
        path = OrExpr(path, parsed)
 | 
			
		||||
        OrExpr(path, parsed)
 | 
			
		||||
        parsed
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue