mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/openssl/ossl_ssl_session.c (ossl_ssl_session_initialize):
Add a null check for ssl; submitted by akira yamada in [ruby-dev:34950]. * ext/openssl/ossl_ssl.c (Init_ossl_ssl): Define OP_NO_TICKET if SSL_OP_NO_TICKET is present; submitted by akira yamada in [ruby-dev:34944]. * test/openssl/test_ssl.rb (OpenSSL#test_server_session): Add a workaround for the case where OpenSSL is configured with --enable-tlsext; submitted by akira yamada in [ruby-dev:34944]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
70bde7a3b5
commit
061fd36d75
36 changed files with 87 additions and 49 deletions
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
||||||
|
Fri Jun 6 17:04:56 2008 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
|
* ext/openssl/ossl_ssl_session.c (ossl_ssl_session_initialize):
|
||||||
|
Add a null check for ssl; submitted by akira yamada
|
||||||
|
in [ruby-dev:34950].
|
||||||
|
|
||||||
|
* ext/openssl/ossl_ssl.c (Init_ossl_ssl): Define OP_NO_TICKET if
|
||||||
|
SSL_OP_NO_TICKET is present; submitted by akira yamada
|
||||||
|
in [ruby-dev:34944].
|
||||||
|
|
||||||
|
* test/openssl/test_ssl.rb (OpenSSL#test_server_session): Add a
|
||||||
|
workaround for the case where OpenSSL is configured with
|
||||||
|
--enable-tlsext; submitted by akira yamada in [ruby-dev:34944].
|
||||||
|
|
||||||
Fri Jun 6 16:58:23 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Fri Jun 6 16:58:23 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* ext/iconv/iconv.c (iconv_iconv): fix for length argument and now
|
* ext/iconv/iconv.c (iconv_iconv): fix for length argument and now
|
||||||
|
|
|
@ -1466,6 +1466,9 @@ Init_ossl_ssl()
|
||||||
ossl_ssl_def_const(OP_NO_SSLv2);
|
ossl_ssl_def_const(OP_NO_SSLv2);
|
||||||
ossl_ssl_def_const(OP_NO_SSLv3);
|
ossl_ssl_def_const(OP_NO_SSLv3);
|
||||||
ossl_ssl_def_const(OP_NO_TLSv1);
|
ossl_ssl_def_const(OP_NO_TLSv1);
|
||||||
|
#if defined(SSL_OP_NO_TICKET)
|
||||||
|
ossl_ssl_def_const(OP_NO_TICKET);
|
||||||
|
#endif
|
||||||
ossl_ssl_def_const(OP_PKCS1_CHECK_1);
|
ossl_ssl_def_const(OP_PKCS1_CHECK_1);
|
||||||
ossl_ssl_def_const(OP_PKCS1_CHECK_2);
|
ossl_ssl_def_const(OP_PKCS1_CHECK_2);
|
||||||
ossl_ssl_def_const(OP_NETSCAPE_CA_DN_BUG);
|
ossl_ssl_def_const(OP_NETSCAPE_CA_DN_BUG);
|
||||||
|
|
|
@ -47,7 +47,7 @@ static VALUE ossl_ssl_session_initialize(VALUE self, VALUE arg1)
|
||||||
|
|
||||||
Data_Get_Struct(arg1, SSL, ssl);
|
Data_Get_Struct(arg1, SSL, ssl);
|
||||||
|
|
||||||
if ((ctx = SSL_get1_session(ssl)) == NULL)
|
if (!ssl || (ctx = SSL_get1_session(ssl)) == NULL)
|
||||||
ossl_raise(eSSLSession, "no session available");
|
ossl_raise(eSSLSession, "no session available");
|
||||||
} else {
|
} else {
|
||||||
BIO *in = ossl_obj2bio(arg1);
|
BIO *in = ossl_obj2bio(arg1);
|
||||||
|
|
|
@ -230,7 +230,7 @@ class CGI
|
||||||
# session_path:: the path for which this session applies. Defaults
|
# session_path:: the path for which this session applies. Defaults
|
||||||
# to the directory of the CGI script.
|
# to the directory of the CGI script.
|
||||||
#
|
#
|
||||||
# +option+ is also passed on to the session storage class initialiser; see
|
# +option+ is also passed on to the session storage class initializer; see
|
||||||
# the documentation for each session storage class for the options
|
# the documentation for each session storage class for the options
|
||||||
# they support.
|
# they support.
|
||||||
#
|
#
|
||||||
|
@ -357,7 +357,7 @@ class CGI
|
||||||
# characters; automatically generated session ids observe
|
# characters; automatically generated session ids observe
|
||||||
# this requirement.
|
# this requirement.
|
||||||
#
|
#
|
||||||
# +option+ is a hash of options for the initialiser. The
|
# +option+ is a hash of options for the initializer. The
|
||||||
# following options are recognised:
|
# following options are recognised:
|
||||||
#
|
#
|
||||||
# tmpdir:: the directory to use for storing the FileStore
|
# tmpdir:: the directory to use for storing the FileStore
|
||||||
|
|
|
@ -30,7 +30,7 @@ class CGI
|
||||||
# characters; automatically generated session ids observe
|
# characters; automatically generated session ids observe
|
||||||
# this requirement.
|
# this requirement.
|
||||||
#
|
#
|
||||||
# +option+ is a hash of options for the initialiser. The
|
# +option+ is a hash of options for the initializer. The
|
||||||
# following options are recognised:
|
# following options are recognised:
|
||||||
#
|
#
|
||||||
# tmpdir:: the directory to use for storing the PStore
|
# tmpdir:: the directory to use for storing the PStore
|
||||||
|
|
|
@ -250,7 +250,7 @@ SimpleDelegater = SimpleDelegator
|
||||||
# your class.
|
# your class.
|
||||||
#
|
#
|
||||||
# class MyClass < DelegateClass( ClassToDelegateTo ) # Step 1
|
# class MyClass < DelegateClass( ClassToDelegateTo ) # Step 1
|
||||||
# def initiaize
|
# def initialize
|
||||||
# super(obj_of_ClassToDelegateTo) # Step 2
|
# super(obj_of_ClassToDelegateTo) # Step 2
|
||||||
# end
|
# end
|
||||||
# end
|
# end
|
||||||
|
|
|
@ -656,7 +656,7 @@ class ERB
|
||||||
#
|
#
|
||||||
# def build
|
# def build
|
||||||
# b = binding
|
# b = binding
|
||||||
# # create and run templates, filling member data variebles
|
# # create and run templates, filling member data variables
|
||||||
# ERB.new(<<-'END_PRODUCT'.gsub(/^\s+/, ""), 0, "", "@product").result b
|
# ERB.new(<<-'END_PRODUCT'.gsub(/^\s+/, ""), 0, "", "@product").result b
|
||||||
# <%= PRODUCT[:name] %>
|
# <%= PRODUCT[:name] %>
|
||||||
# <%= PRODUCT[:desc] %>
|
# <%= PRODUCT[:desc] %>
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
# @q = [ ] # prepare delegate object
|
# @q = [ ] # prepare delegate object
|
||||||
# end
|
# end
|
||||||
#
|
#
|
||||||
# # setup prefered interface, enq() and deq()...
|
# # setup preferred interface, enq() and deq()...
|
||||||
# def_delegator :@q, :push, :enq
|
# def_delegator :@q, :push, :enq
|
||||||
# def_delegator :@q, :shift, :deq
|
# def_delegator :@q, :shift, :deq
|
||||||
#
|
#
|
||||||
|
|
|
@ -112,7 +112,7 @@ module IRB
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# aliases = [commans_alias, flag], ...
|
# aliases = [commands_alias, flag], ...
|
||||||
def self.def_extend_command(cmd_name, cmd_class, load_file = nil, *aliases)
|
def self.def_extend_command(cmd_name, cmd_class, load_file = nil, *aliases)
|
||||||
case cmd_class
|
case cmd_class
|
||||||
when Symbol
|
when Symbol
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# irb/help.rb - print usase module
|
# irb/help.rb - print usage module
|
||||||
# $Release Version: 0.9.5$
|
# $Release Version: 0.9.5$
|
||||||
# $Revision$
|
# $Revision$
|
||||||
# $Date$
|
# $Date$
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# notifier.rb - optput methods used by irb
|
# notifier.rb - output methods used by irb
|
||||||
# $Release Version: 0.9.5$
|
# $Release Version: 0.9.5$
|
||||||
# $Revision$
|
# $Revision$
|
||||||
# $Date$
|
# $Date$
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# irb/ruby-lex.rb - ruby lexcal analizer
|
# irb/ruby-lex.rb - ruby lexcal analyzer
|
||||||
# $Release Version: 0.9.5$
|
# $Release Version: 0.9.5$
|
||||||
# $Revision$
|
# $Revision$
|
||||||
# $Date$
|
# $Date$
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# irb/slex.rb - symple lex analizer
|
# irb/slex.rb - simple lex analyzer
|
||||||
# $Release Version: 0.9.5$
|
# $Release Version: 0.9.5$
|
||||||
# $Revision$
|
# $Revision$
|
||||||
# $Date$
|
# $Date$
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# logger.rb - saimple logging utility
|
# logger.rb - simple logging utility
|
||||||
# Copyright (C) 2000-2003, 2005 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>.
|
# Copyright (C) 2000-2003, 2005 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>.
|
||||||
|
|
||||||
require 'monitor'
|
require 'monitor'
|
||||||
|
|
|
@ -65,11 +65,11 @@ It can be replaced by the following code:
|
||||||
|
|
||||||
: key, key=((|key|))
|
: key, key=((|key|))
|
||||||
Sets an OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object.
|
Sets an OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object.
|
||||||
(This method is appeared in Michal Rokos's OpenSSL extention.)
|
(This method is appeared in Michal Rokos's OpenSSL extension.)
|
||||||
|
|
||||||
: cert, cert=((|cert|))
|
: cert, cert=((|cert|))
|
||||||
Sets an OpenSSL::X509::Certificate object as client certificate
|
Sets an OpenSSL::X509::Certificate object as client certificate
|
||||||
(This method is appeared in Michal Rokos's OpenSSL extention).
|
(This method is appeared in Michal Rokos's OpenSSL extension).
|
||||||
|
|
||||||
: ca_file, ca_file=((|path|))
|
: ca_file, ca_file=((|path|))
|
||||||
Sets path of a CA certification file in PEM format.
|
Sets path of a CA certification file in PEM format.
|
||||||
|
|
|
@ -826,7 +826,7 @@ class OptionParser
|
||||||
#
|
#
|
||||||
# Directs to reject specified class argument.
|
# Directs to reject specified class argument.
|
||||||
#
|
#
|
||||||
# +t+:: Argument class speficier, any object including Class.
|
# +t+:: Argument class specifier, any object including Class.
|
||||||
#
|
#
|
||||||
# reject(t)
|
# reject(t)
|
||||||
#
|
#
|
||||||
|
@ -1037,13 +1037,13 @@ class OptionParser
|
||||||
# "-x[OPTIONAL]"
|
# "-x[OPTIONAL]"
|
||||||
# "-x"
|
# "-x"
|
||||||
# There is also a special form which matches character range (not full
|
# There is also a special form which matches character range (not full
|
||||||
# set of regural expression):
|
# set of regular expression):
|
||||||
# "-[a-z]MANDATORY"
|
# "-[a-z]MANDATORY"
|
||||||
# "-[a-z][OPTIONAL]"
|
# "-[a-z][OPTIONAL]"
|
||||||
# "-[a-z]"
|
# "-[a-z]"
|
||||||
#
|
#
|
||||||
# [Argument style and description:]
|
# [Argument style and description:]
|
||||||
# Instead of specifying mandatory or optional orguments directly in the
|
# Instead of specifying mandatory or optional arguments directly in the
|
||||||
# switch parameter, this separate parameter can be used.
|
# switch parameter, this separate parameter can be used.
|
||||||
# "=MANDATORY"
|
# "=MANDATORY"
|
||||||
# "=[OPTIONAL]"
|
# "=[OPTIONAL]"
|
||||||
|
|
|
@ -11,14 +11,14 @@ require "fileutils"
|
||||||
require "digest/md5"
|
require "digest/md5"
|
||||||
|
|
||||||
#
|
#
|
||||||
# PStore implements a file based persistance mechanism based on a Hash. User
|
# PStore implements a file based persistence mechanism based on a Hash. User
|
||||||
# code can store hierarchies of Ruby objects (values) into the data store file
|
# code can store hierarchies of Ruby objects (values) into the data store file
|
||||||
# by name (keys). An object hierarchy may be just a single object. User code
|
# by name (keys). An object hierarchy may be just a single object. User code
|
||||||
# may later read values back from the data store or even update data, as needed.
|
# may later read values back from the data store or even update data, as needed.
|
||||||
#
|
#
|
||||||
# The transactional behavior ensures that any changes succeed or fail together.
|
# The transactional behavior ensures that any changes succeed or fail together.
|
||||||
# This can be used to ensure that the data store is not left in a transitory
|
# This can be used to ensure that the data store is not left in a transitory
|
||||||
# state, where some values were upated but others were not.
|
# state, where some values were updated but others were not.
|
||||||
#
|
#
|
||||||
# Behind the scenes, Ruby objects are stored to the data store file with
|
# Behind the scenes, Ruby objects are stored to the data store file with
|
||||||
# Marshal. That carries the usual limitations. Proc objects cannot be
|
# Marshal. That carries the usual limitations. Proc objects cannot be
|
||||||
|
|
|
@ -117,10 +117,10 @@ module RDoc
|
||||||
# method in the HTML output. This method must be in the same source file
|
# method in the HTML output. This method must be in the same source file
|
||||||
# as the rb_define_method.
|
# as the rb_define_method.
|
||||||
#
|
#
|
||||||
# C classes can be diagramed (see /tc/dl/ruby/ruby/error.c), and RDoc
|
# C classes can be diagrammed (see /tc/dl/ruby/ruby/error.c), and RDoc
|
||||||
# integrates C and Ruby source into one tree
|
# integrates C and Ruby source into one tree
|
||||||
#
|
#
|
||||||
# The comment blocks may include special direcives:
|
# The comment blocks may include special directives:
|
||||||
#
|
#
|
||||||
# [Document-class: <i>name</i>]
|
# [Document-class: <i>name</i>]
|
||||||
# This comment block is documentation for the given class. Use this
|
# This comment block is documentation for the given class. Use this
|
||||||
|
@ -131,10 +131,10 @@ module RDoc
|
||||||
# automatically find the method from it's declaration
|
# automatically find the method from it's declaration
|
||||||
#
|
#
|
||||||
# [call-seq: <i>text up to an empty line</i>]
|
# [call-seq: <i>text up to an empty line</i>]
|
||||||
# Because C source doesn't give descripive names to Ruby-level parameters,
|
# Because C source doesn't give descriptive names to Ruby-level parameters,
|
||||||
# you need to document the calling sequence explicitly
|
# you need to document the calling sequence explicitly
|
||||||
#
|
#
|
||||||
# In additon, RDoc assumes by default that the C method implementing a
|
# In addition, RDoc assumes by default that the C method implementing a
|
||||||
# Ruby function is in the same source file as the rb_define_method call.
|
# Ruby function is in the same source file as the rb_define_method call.
|
||||||
# If this isn't the case, add the comment
|
# If this isn't the case, add the comment
|
||||||
#
|
#
|
||||||
|
|
|
@ -201,7 +201,7 @@ module RDoc
|
||||||
@progress = $stderr unless options.quiet
|
@progress = $stderr unless options.quiet
|
||||||
end
|
end
|
||||||
|
|
||||||
# devine code constructs
|
# define code constructs
|
||||||
def scan
|
def scan
|
||||||
|
|
||||||
# remove private comment
|
# remove private comment
|
||||||
|
@ -1065,7 +1065,7 @@ module RDoc
|
||||||
#
|
#
|
||||||
# If "all" argument is true, information of all arguments are returned.
|
# If "all" argument is true, information of all arguments are returned.
|
||||||
# If "modified_params" is true, list of arguments are decorated,
|
# If "modified_params" is true, list of arguments are decorated,
|
||||||
# for exameple, optional arguments are parenthetic as "[arg]".
|
# for example, optional arguments are parenthetic as "[arg]".
|
||||||
#
|
#
|
||||||
def find_arguments(args, text, all=nil, indent=nil, modified_params=nil)
|
def find_arguments(args, text, all=nil, indent=nil, modified_params=nil)
|
||||||
return unless args || all
|
return unless args || all
|
||||||
|
@ -1143,8 +1143,8 @@ EOF
|
||||||
|
|
||||||
#
|
#
|
||||||
# Comments just after module or subprogram, or arguments are
|
# Comments just after module or subprogram, or arguments are
|
||||||
# returnd. If "COMMENTS_ARE_UPPER" is true, comments just before
|
# returned. If "COMMENTS_ARE_UPPER" is true, comments just before
|
||||||
# modules or subprograms are returnd
|
# modules or subprograms are returned
|
||||||
#
|
#
|
||||||
def find_comments text
|
def find_comments text
|
||||||
return "" unless text
|
return "" unless text
|
||||||
|
|
|
@ -252,7 +252,7 @@ class Resolv
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# Iterates over all hostnames for +address+ retrived from the hosts file.
|
# Iterates over all hostnames for +address+ retrieved from the hosts file.
|
||||||
|
|
||||||
def each_name(address, &proc)
|
def each_name(address, &proc)
|
||||||
lazy_initialize
|
lazy_initialize
|
||||||
|
@ -2015,7 +2015,7 @@ class Resolv
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# A String reperesentation of this IPv4 address.
|
# A String representation of this IPv4 address.
|
||||||
|
|
||||||
##
|
##
|
||||||
# The raw IPv4 address as a String.
|
# The raw IPv4 address as a String.
|
||||||
|
|
|
@ -44,7 +44,7 @@ module REXML
|
||||||
@pairs.keys.include? key
|
@pairs.keys.include? key
|
||||||
end
|
end
|
||||||
|
|
||||||
# Itterate over the key/value pairs:
|
# Iterate over the key/value pairs:
|
||||||
# attlist_decl.each { |attribute_name, attribute_value| ... }
|
# attlist_decl.each { |attribute_name, attribute_value| ... }
|
||||||
def each(&block)
|
def each(&block)
|
||||||
@pairs.each(&block)
|
@pairs.each(&block)
|
||||||
|
|
|
@ -147,7 +147,7 @@ module REXML
|
||||||
# A controversial point is whether Document should always write the XML
|
# A controversial point is whether Document should always write the XML
|
||||||
# declaration (<?xml version='1.0'?>) whether or not one is given by the
|
# declaration (<?xml version='1.0'?>) whether or not one is given by the
|
||||||
# user (or source document). REXML does not write one if one was not
|
# user (or source document). REXML does not write one if one was not
|
||||||
# specified, because it adds unneccessary bandwidth to applications such
|
# specified, because it adds unnecessary bandwidth to applications such
|
||||||
# as XML-RPC.
|
# as XML-RPC.
|
||||||
#
|
#
|
||||||
# See also the classes in the rexml/formatters package for the proper way
|
# See also the classes in the rexml/formatters package for the proper way
|
||||||
|
|
|
@ -360,7 +360,7 @@ module REXML
|
||||||
# Iterates through the children, yielding for each Element that
|
# Iterates through the children, yielding for each Element that
|
||||||
# has a particular text set.
|
# has a particular text set.
|
||||||
# text::
|
# text::
|
||||||
# the text to search for. If nil, or not supplied, will itterate
|
# the text to search for. If nil, or not supplied, will iterate
|
||||||
# over all +Element+ children that contain at least one +Text+ node.
|
# over all +Element+ children that contain at least one +Text+ node.
|
||||||
# max::
|
# max::
|
||||||
# (optional) causes this method to return after yielding
|
# (optional) causes this method to return after yielding
|
||||||
|
@ -989,7 +989,7 @@ module REXML
|
||||||
end
|
end
|
||||||
alias :size :length
|
alias :size :length
|
||||||
|
|
||||||
# Itterates over the attributes of an Element. Yields actual Attribute
|
# Iterates over the attributes of an Element. Yields actual Attribute
|
||||||
# nodes, not String values.
|
# nodes, not String values.
|
||||||
#
|
#
|
||||||
# doc = Document.new '<a x="1" y="2"/>'
|
# doc = Document.new '<a x="1" y="2"/>'
|
||||||
|
@ -1006,7 +1006,7 @@ module REXML
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Itterates over each attribute of an Element, yielding the expanded name
|
# Iterates over each attribute of an Element, yielding the expanded name
|
||||||
# and value as a pair of Strings.
|
# and value as a pair of Strings.
|
||||||
#
|
#
|
||||||
# doc = Document.new '<a x="1" y="2"/>'
|
# doc = Document.new '<a x="1" y="2"/>'
|
||||||
|
|
|
@ -125,7 +125,7 @@ module REXML
|
||||||
end
|
end
|
||||||
|
|
||||||
def wrap(string, width)
|
def wrap(string, width)
|
||||||
# Recursivly wrap string at width.
|
# Recursively wrap string at width.
|
||||||
return string if string.length <= width
|
return string if string.length <= width
|
||||||
place = string.rindex(' ', width) # Position in string with last ' ' before cutoff
|
place = string.rindex(' ', width) # Position in string with last ' ' before cutoff
|
||||||
return string[0,place] + "\n" + wrap(string[place+1..-1], width)
|
return string[0,place] + "\n" + wrap(string[place+1..-1], width)
|
||||||
|
|
|
@ -235,7 +235,7 @@ module REXML
|
||||||
# from string then we ignore the second &
|
# from string then we ignore the second &
|
||||||
# subsequent mappings
|
# subsequent mappings
|
||||||
#
|
#
|
||||||
# if a charactcer maps to nil then we delete it
|
# if a character maps to nil then we delete it
|
||||||
# in the output. This happens if the from
|
# in the output. This happens if the from
|
||||||
# string is longer than the to string
|
# string is longer than the to string
|
||||||
#
|
#
|
||||||
|
|
|
@ -189,7 +189,7 @@ module REXML
|
||||||
end
|
end
|
||||||
|
|
||||||
def wrap(string, width, addnewline=false)
|
def wrap(string, width, addnewline=false)
|
||||||
# Recursivly wrap string at width.
|
# Recursively wrap string at width.
|
||||||
return string if string.length <= width
|
return string if string.length <= width
|
||||||
place = string.rindex(' ', width) # Position in string with last ' ' before cutoff
|
place = string.rindex(' ', width) # Position in string with last ' ' before cutoff
|
||||||
if addnewline then
|
if addnewline then
|
||||||
|
|
|
@ -30,7 +30,7 @@ module REXML
|
||||||
parser.parse(path, element).flatten[0]
|
parser.parse(path, element).flatten[0]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Itterates over nodes that match the given path, calling the supplied
|
# Iterates over nodes that match the given path, calling the supplied
|
||||||
# block with the match.
|
# block with the match.
|
||||||
# element::
|
# element::
|
||||||
# The context element
|
# The context element
|
||||||
|
|
|
@ -19,7 +19,7 @@ module Rinda
|
||||||
# 1. A RingServer begins listening on the broadcast UDP address.
|
# 1. A RingServer begins listening on the broadcast UDP address.
|
||||||
# 2. A RingFinger sends a UDP packet containing the DRb URI where it will
|
# 2. A RingFinger sends a UDP packet containing the DRb URI where it will
|
||||||
# listen for a reply.
|
# listen for a reply.
|
||||||
# 3. The RingServer recieves the UDP packet and connects back to the
|
# 3. The RingServer receives the UDP packet and connects back to the
|
||||||
# provided DRb URI with the DRb service.
|
# provided DRb URI with the DRb service.
|
||||||
|
|
||||||
class RingServer
|
class RingServer
|
||||||
|
@ -119,7 +119,7 @@ module Rinda
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# Contains all discoverd TupleSpaces except for the primary.
|
# Contains all discovered TupleSpaces except for the primary.
|
||||||
|
|
||||||
def self.to_a
|
def self.to_a
|
||||||
finger.to_a
|
finger.to_a
|
||||||
|
|
|
@ -363,7 +363,7 @@ class Time
|
||||||
min = $5.to_i
|
min = $5.to_i
|
||||||
sec = $6.to_i
|
sec = $6.to_i
|
||||||
usec = 0
|
usec = 0
|
||||||
usec = $7.to_f * 1000000 if $7
|
usec = ($7[1..-1] + '000000')[0,6].to_i if $7
|
||||||
if $8
|
if $8
|
||||||
zone = $8
|
zone = $8
|
||||||
year, mon, day, hour, min, sec =
|
year, mon, day, hour, min, sec =
|
||||||
|
@ -621,6 +621,8 @@ if __FILE__ == $0
|
||||||
t = Time.utc(1960, 12, 31, 23, 0, 0, 123456)
|
t = Time.utc(1960, 12, 31, 23, 0, 0, 123456)
|
||||||
assert_equal("1960-12-31T23:00:00.123456Z", t.xmlschema(6))
|
assert_equal("1960-12-31T23:00:00.123456Z", t.xmlschema(6))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
assert_equal(249, Time.xmlschema("2008-06-05T23:49:23.000249+09:00").usec)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_completion
|
def test_completion
|
||||||
|
|
|
@ -47,7 +47,7 @@ module WEBrick
|
||||||
req.header.delete("proxy-authorization")
|
req.header.delete("proxy-authorization")
|
||||||
end
|
end
|
||||||
|
|
||||||
# Some header fields shuold not be transfered.
|
# Some header fields should not be transferred.
|
||||||
HopByHop = %w( connection keep-alive proxy-authenticate upgrade
|
HopByHop = %w( connection keep-alive proxy-authenticate upgrade
|
||||||
proxy-authorization te trailers transfer-encoding )
|
proxy-authorization te trailers transfer-encoding )
|
||||||
ShouldNotTransfer = %w( set-cookie proxy-connection )
|
ShouldNotTransfer = %w( set-cookie proxy-connection )
|
||||||
|
|
|
@ -132,7 +132,7 @@ module WEBrick
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Determin the message length (RFC2616 -- 4.4 Message Length)
|
# Determine the message length (RFC2616 -- 4.4 Message Length)
|
||||||
if @status == 304 || @status == 204 || HTTPStatus::info?(@status)
|
if @status == 304 || @status == 204 || HTTPStatus::info?(@status)
|
||||||
@header.delete('content-length')
|
@header.delete('content-length')
|
||||||
@body = ""
|
@body = ""
|
||||||
|
|
|
@ -496,7 +496,7 @@ BSD_vfprintf(fp, fmt0, ap)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Choose PADSIZE to trade efficiency vs. size. If larger printf
|
* Choose PADSIZE to trade efficiency vs. size. If larger printf
|
||||||
* fields occur frequently, increase PADSIZE and make the initialisers
|
* fields occur frequently, increase PADSIZE and make the initializers
|
||||||
* below longer.
|
* below longer.
|
||||||
*/
|
*/
|
||||||
#define PADSIZE 16 /* pad chunk size */
|
#define PADSIZE 16 /* pad chunk size */
|
||||||
|
|
17
object.c
17
object.c
|
@ -1573,8 +1573,21 @@ rb_class_initialize(argc, argv, klass)
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* class.allocate() => obj
|
* class.allocate() => obj
|
||||||
*
|
*
|
||||||
* Allocates space for a new object of <i>class</i>'s class. The
|
* Allocates space for a new object of <i>class</i>'s class and does not
|
||||||
* returned object must be an instance of <i>class</i>.
|
* call initialize on the new instance. The returned object must be an
|
||||||
|
* instance of <i>class</i>.
|
||||||
|
*
|
||||||
|
* klass = Class.new do
|
||||||
|
* def initialize(*args)
|
||||||
|
* @initialized = true
|
||||||
|
* end
|
||||||
|
*
|
||||||
|
* def initialized?
|
||||||
|
* @initialized || false
|
||||||
|
* end
|
||||||
|
* end
|
||||||
|
*
|
||||||
|
* klass.allocate.initialized? #=> false
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -499,7 +499,12 @@ class OpenSSL::TestSSL < Test::Unit::TestCase
|
||||||
start_server(PORT, OpenSSL::SSL::VERIFY_NONE, true, :ctx_proc => ctx_proc, :server_proc => server_proc) do |server, port|
|
start_server(PORT, OpenSSL::SSL::VERIFY_NONE, true, :ctx_proc => ctx_proc, :server_proc => server_proc) do |server, port|
|
||||||
10.times do |i|
|
10.times do |i|
|
||||||
sock = TCPSocket.new("127.0.0.1", port)
|
sock = TCPSocket.new("127.0.0.1", port)
|
||||||
ssl = OpenSSL::SSL::SSLSocket.new(sock)
|
ctx = OpenSSL::SSL::SSLContext.new
|
||||||
|
if defined?(OpenSSL::SSL::OP_NO_TICKET)
|
||||||
|
# disable RFC4507 support
|
||||||
|
ctx.options = OpenSSL::SSL::OP_NO_TICKET
|
||||||
|
end
|
||||||
|
ssl = OpenSSL::SSL::SSLSocket.new(sock, ctx)
|
||||||
ssl.sync_close = true
|
ssl.sync_close = true
|
||||||
ssl.session = first_session if first_session
|
ssl.session = first_session if first_session
|
||||||
ssl.connect
|
ssl.connect
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#define RUBY_RELEASE_DATE "2008-06-06"
|
#define RUBY_RELEASE_DATE "2008-06-06"
|
||||||
#define RUBY_VERSION_CODE 187
|
#define RUBY_VERSION_CODE 187
|
||||||
#define RUBY_RELEASE_CODE 20080606
|
#define RUBY_RELEASE_CODE 20080606
|
||||||
#define RUBY_PATCHLEVEL 5
|
#define RUBY_PATCHLEVEL 6
|
||||||
|
|
||||||
#define RUBY_VERSION_MAJOR 1
|
#define RUBY_VERSION_MAJOR 1
|
||||||
#define RUBY_VERSION_MINOR 8
|
#define RUBY_VERSION_MINOR 8
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_WINSOCK2
|
#ifdef USE_WINSOCK2
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
|
#include <ws2tcpip.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#else
|
#else
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue