Project

General

Profile

Feature #6707 ยป 0001-Remove-checks-for-RUBY_VERSION.patch

oscardelben (Oscar Del Ben), 07/09/2012 01:40 AM

View differences:

lib/cgi.rb
10 10
# Documentation: Wakou Aoyama (RDoc'd and embellished by William Webber)
11 11
#
12 12

  
13
raise "Please, use ruby 1.9.0 or later." if RUBY_VERSION < "1.9.0"
14

  
15 13
# == Overview
16 14
#
17 15
# The Common Gateway Interface (CGI) is a simple protocol for passing an HTTP
lib/drb/drb.rb
1545 1545

  
1546 1546
    end
1547 1547

  
1548
    if RUBY_VERSION >= '1.8'
1549
      require 'drb/invokemethod'
1550
      class InvokeMethod
1551
        include InvokeMethod18Mixin
1552
      end
1553
    else
1554
      require 'drb/invokemethod16'
1555
      class InvokeMethod
1556
        include InvokeMethod16Mixin
1557
      end
1548
    require 'drb/invokemethod'
1549
    class InvokeMethod
1550
      include InvokeMethod18Mixin
1558 1551
    end
1559 1552

  
1560 1553
    # The main loop performed by a DRbServer's internal thread.
lib/irb/init.rb
122 122
    @CONF[:LC_MESSAGES].load("irb/error.rb")
123 123
  end
124 124

  
125
  FEATURE_IOPT_CHANGE_VERSION = "1.9.0"
126

  
127 125
  # option analyzing
128 126
  def IRB.parse_opts
129 127
    load_path = []
......
220 218
	break
221 219
      end
222 220
    end
223
    if RUBY_VERSION >= FEATURE_IOPT_CHANGE_VERSION
224
      load_path.collect! do |path|
225
	/\A\.\// =~ path ? path : File.expand_path(path)
226
      end
221
    load_path.collect! do |path|
222
/\A\.\// =~ path ? path : File.expand_path(path)
227 223
    end
228 224
    $LOAD_PATH.unshift(*load_path)
229 225

  
lib/open-uri.rb
249 249
      raise "Non-HTTP proxy URI: #{proxy_uri}" if proxy_uri.class != URI::HTTP
250 250
    end
251 251

  
252
    if target.userinfo && "1.9.0" <= RUBY_VERSION
253
      # don't raise for 1.8 because compatibility.
254
      raise ArgumentError, "userinfo not supported.  [RFC3986]"
255
    end
256

  
257 252
    header = {}
258 253
    options.each {|k, v| header[k] = v if String === k }
259 254

  
lib/webrick/httpproxy.rb
12 12
require "webrick/httpserver"
13 13
require "net/http"
14 14

  
15
Net::HTTP::version_1_2 if RUBY_VERSION < "1.7"
16

  
17 15
module WEBrick
18 16
  NullReader = Object.new
19 17
  class << NullReader
20
-