Skip to content

Commit

Permalink
Showing 14 changed files with 67 additions and 26 deletions.
6 changes: 3 additions & 3 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ DO NOT MODIFIY - GENERATED CODE
<artifactId>jruby-core</artifactId>
<name>JRuby Core</name>
<properties>
<version.ruby>2.3.0</version.ruby>
<version.ruby>2.3.1</version.ruby>
<prawn.dir>${test.dir}/prawn</prawn.dir>
<spec.tags.dir>${spec.dir}/tags</spec.tags.dir>
<polyglot.dump.pom>pom.xml</polyglot.dump.pom>
@@ -28,7 +28,7 @@ DO NOT MODIFIY - GENERATED CODE
<jruby.test.memory.permgen>2G</jruby.test.memory.permgen>
<installer.gems>${jruby.win32ole.gem}</installer.gems>
<prawn.git.repo>git://github.com/sandal/prawn.git</prawn.git.repo>
<version.ruby.minor>0</version.ruby.minor>
<version.ruby.minor>1</version.ruby.minor>
<tzdata.version>2013d</tzdata.version>
<install4j.executable>/Applications/install4j 4/bin/install4jc</install4j.executable>
<jay.bin>jay</jay.bin>
@@ -48,7 +48,7 @@ DO NOT MODIFIY - GENERATED CODE
<parser.dir>core/src/main/java/org/jruby/parser</parser.dir>
<jruby.basedir>${basedir}/..</jruby.basedir>
<rubyspec.dir>${spec.dir}/ruby</rubyspec.dir>
<version.ruby.revision>52539</version.ruby.revision>
<version.ruby.revision>54768</version.ruby.revision>
<jruby.test.memory>3G</jruby.test.memory>
<mspec.dir>${spec.dir}/mspec</mspec.dir>
<build.date>${maven.build.timestamp}</build.date>
6 changes: 3 additions & 3 deletions default.build.properties
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ rake.args=
install4j.executable=/Applications/install4j 4/bin/install4jc

# Ruby versions
version.ruby=2.3.0
version.ruby=2.3.1
version.ruby.major=2.3
version.ruby.minor=0
version.ruby.revision=52539
version.ruby.minor=1
version.ruby.revision=54768
14 changes: 12 additions & 2 deletions lib/ruby/stdlib/forwardable.rb
Original file line number Diff line number Diff line change
@@ -178,6 +178,11 @@ def def_instance_delegators(accessor, *methods)
# q.push 23 #=> NoMethodError
#
def def_instance_delegator(accessor, method, ali = method)
accessor = accessor.to_s
if method_defined?(accessor) || private_method_defined?(accessor)
accessor = "#{accessor}()"
end

line_no = __LINE__; str = %{
def #{ali}(*args, &block)
begin
@@ -270,7 +275,12 @@ def def_single_delegators(accessor, *methods)
# the method of the same name in _accessor_). If _new_name_ is
# provided, it is used as the name for the delegate method.
def def_single_delegator(accessor, method, ali = method)
str = %{
accessor = accessor.to_s
if method_defined?(accessor) || private_method_defined?(accessor)
accessor = "#{accessor}()"
end

line_no = __LINE__; str = %{
def #{ali}(*args, &block)
begin
#{accessor}.__send__(:#{method}, *args, &block)
@@ -281,7 +291,7 @@ def #{ali}(*args, &block)
end
}

instance_eval(str, __FILE__, __LINE__)
instance_eval(str, __FILE__, line_no)
end

alias delegate single_delegate
2 changes: 1 addition & 1 deletion lib/ruby/stdlib/irb.rb
Original file line number Diff line number Diff line change
@@ -525,7 +525,7 @@ def eval_input
print messages.join("\n"), "\n"
unless lasts.empty?
printf "... %d levels...\n", levels if levels > 0
print lasts.join("\n")
print lasts.join("\n"), "\n"
end
print "Maybe IRB bug!\n" if irb_bug
end
1 change: 1 addition & 0 deletions lib/ruby/stdlib/irb/ext/save-history.rb
Original file line number Diff line number Diff line change
@@ -27,6 +27,7 @@ def save_history
IRB.conf[:SAVE_HISTORY]
end

remove_method :save_history= if respond_to?(:save_history=)
# Sets <code>IRB.conf[:SAVE_HISTORY]</code> to the given +val+ and calls
# #init_save_history with this context.
#
2 changes: 1 addition & 1 deletion lib/ruby/stdlib/logger.rb
Original file line number Diff line number Diff line change
@@ -416,7 +416,7 @@ def reopen(logdev = nil)
# * Append open does not need to lock file.
# * If the OS supports multi I/O, records possibly may be mixed.
#
def add(severity, message = nil, progname = nil, &block)
def add(severity, message = nil, progname = nil)
severity ||= UNKNOWN
if @logdev.nil? or severity < @level
return true
4 changes: 4 additions & 0 deletions lib/ruby/stdlib/net/ftp.rb
Original file line number Diff line number Diff line change
@@ -1270,6 +1270,10 @@ class NullSocket
def read_timeout=(sec)
end

def closed?
true
end

def close
end

12 changes: 11 additions & 1 deletion lib/ruby/stdlib/ostruct.rb
Original file line number Diff line number Diff line change
@@ -71,6 +71,11 @@
# of these properties compared to using a Hash or a Struct.
#
class OpenStruct
# :nodoc:
class << self
alias allocate new
end

#
# Creates a new OpenStruct object. By default, the resulting OpenStruct
# object will have no attributes.
@@ -163,14 +168,19 @@ def modifiable
#
def new_ostruct_member(name)
name = name.to_sym
unless respond_to?(name)
unless singleton_class.method_defined?(name)
define_singleton_method(name) { @table[name] }
define_singleton_method("#{name}=") { |x| modifiable[name] = x }
end
name
end
protected :new_ostruct_member

def freeze
@table.each_key {|key| new_ostruct_member(key)}
super
end

def respond_to_missing?(mid, include_private = false)
mname = mid.to_s.chomp("=").to_sym
@table.key?(mname) || super
10 changes: 5 additions & 5 deletions lib/ruby/stdlib/resolv.rb
Original file line number Diff line number Diff line change
@@ -2455,14 +2455,14 @@ def self.create(arg)
when IPv6
return arg
when String
address = ''
address = ''.b
if Regex_8Hex =~ arg
arg.scan(/[0-9A-Fa-f]+/) {|hex| address << [hex.hex].pack('n')}
elsif Regex_CompressedHex =~ arg
prefix = $1
suffix = $2
a1 = ''
a2 = ''
a1 = ''.b
a2 = ''.b
prefix.scan(/[0-9A-Fa-f]+/) {|hex| a1 << [hex.hex].pack('n')}
suffix.scan(/[0-9A-Fa-f]+/) {|hex| a2 << [hex.hex].pack('n')}
omitlen = 16 - a1.length - a2.length
@@ -2478,8 +2478,8 @@ def self.create(arg)
elsif Regex_CompressedHex4Dec =~ arg
prefix, suffix, a, b, c, d = $1, $2, $3.to_i, $4.to_i, $5.to_i, $6.to_i
if (0..255) === a && (0..255) === b && (0..255) === c && (0..255) === d
a1 = ''
a2 = ''
a1 = ''.b
a2 = ''.b
prefix.scan(/[0-9A-Fa-f]+/) {|hex| a1 << [hex.hex].pack('n')}
suffix.scan(/[0-9A-Fa-f]+/) {|hex| a2 << [hex.hex].pack('n')}
omitlen = 12 - a1.length - a2.length
2 changes: 1 addition & 1 deletion lib/ruby/stdlib/uri/generic.rb
Original file line number Diff line number Diff line change
@@ -1341,7 +1341,7 @@ def normalize!
# Constructs String from URI
#
def to_s
str = String.new
str = ''.dup
if @scheme
str << @scheme
str << ':'
6 changes: 4 additions & 2 deletions lib/ruby/stdlib/uri/http.rb
Original file line number Diff line number Diff line change
@@ -63,6 +63,7 @@ def self.build(args)
return super(tmp)
end

=begin
#
# == Description
#
@@ -75,15 +76,16 @@ def self.build(args)
#
# Example:
#
# uri = URI::HTTP.new('http', nil, "www.example.com", nil, "/path",
# "query", 'fragment')
# uri = URI::HTTP.new("http", nil, "www.example.com", nil, nil,
# "/path", nil, "query", "fragment")
#
#
# See also URI::Generic.new
#
def initialize(*arg)
super(*arg)
end
=end

#
# == Description
4 changes: 2 additions & 2 deletions lib/ruby/stdlib/win32/registry.rb
Original file line number Diff line number Diff line change
@@ -333,11 +333,11 @@ def SetValue(hkey, name, type, data, size)
end

def DeleteValue(hkey, name)
check RegDeleteValue.call(hkey, make_wstr(name))
check RegDeleteValueW.call(hkey, make_wstr(name))
end

def DeleteKey(hkey, name)
check RegDeleteKey.call(hkey, make_wstr(name))
check RegDeleteKeyW.call(hkey, make_wstr(name))
end

def FlushKey(hkey)
24 changes: 19 additions & 5 deletions lib/ruby/stdlib/xmlrpc/client.rb
Original file line number Diff line number Diff line change
@@ -433,6 +433,24 @@ def net_http(host, port, proxy_host, proxy_port)
Net::HTTP.new host, port, proxy_host, proxy_port
end

def dup_net_http
http = net_http(@http.address,
@http.port,
@http.proxy_address,
@http.proxy_port)
http.proxy_user = @http.proxy_user
http.proxy_pass = @http.proxy_pass
if @http.use_ssl?
http.use_ssl = true
Net::HTTP::SSL_ATTRIBUTES.each do |attribute|
http.__send__("#{attribute}=", @http.__send__(attribute))
end
end
http.read_timeout = @http.read_timeout
http.open_timeout = @http.open_timeout
http
end

def set_auth
if @user.nil?
@auth = nil
@@ -464,10 +482,7 @@ def do_rpc(request, async=false)

if async
# use a new HTTP object for each call
http = net_http(@host, @port, @proxy_host, @proxy_port)
http.use_ssl = @use_ssl if @use_ssl
http.read_timeout = @timeout
http.open_timeout = @timeout
http = dup_net_http

# post request
http.start {
@@ -612,4 +627,3 @@ def method_missing(mid, *args)
end # class Client

end # module XMLRPC

File renamed without changes.

0 comments on commit f3971e5

Please sign in to comment.