Skip to content

Commit

Permalink
Merge tag 'v2_1_4' into dbussink-ruby-2-1-4
Browse files Browse the repository at this point in the history
Conflicts:
	ChangeLog
	ext/openssl/lib/openssl/ssl.rb
  • Loading branch information
dbussink committed Nov 11, 2014
2 parents 5d491fe + e966a41 commit 25de41c
Show file tree
Hide file tree
Showing 34 changed files with 496 additions and 120 deletions.
145 changes: 136 additions & 9 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,27 +1,154 @@
Fri Sep 26 12:52:36 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
Mon Oct 27 20:20:14 2014 NAKAMURA Usaku <usa@ruby-lang.org>

* ext/stringio/stringio.c (strio_write): ASCII-8BIT StringIO
should be writable any encoding strings, without conversion.
[ruby-core:65240] [Bug #10285]
* lib/rexml/entity.rb: keep the entity size within the limitation.
reported by Willis Vandevanter <[email protected]> and
patched by nahi.

Wed Sep 24 02:30:55 2014 Nobuyoshi Nakada <[email protected]>
Sun Oct 26 03:31:46 2014 Nobuyoshi Nakada <[email protected]>

* parse.y (parse_ident): just after a label, new expression should
start, cannot be a modifier. [ruby-core:65211] [Bug #10279]
* vm_method.c (rb_method_entry_make): warn redefinition only for
already defined methods, but not for undefined methods.
[ruby-dev:48691] [Bug #10421]

Sun Oct 26 03:21:30 2014 Nobuyoshi Nakada <[email protected]>

* class.c (unknown_keyword_error): delete expected keywords
directly from raw table, so that the given block is not called.
[ruby-core:65837] [Bug #10413]

Fri Mar 7 12:06:19 2014 Martin Bosslet <[email protected]>
Wed Oct 22 23:02:49 2014 CHIKANAGA Tomoyuki <[email protected]>

* ext/openssl/lib/openssl/ssl.rb (DEFAULT_PARAMS): override
options even if OpenSSL::SSL::OP_NO_SSLv3 is not defined.
this is pointed out by Stephen Touset. [ruby-core:65711] [Bug #9424]

Wed Oct 22 23:02:49 2014 Martin Bosslet <[email protected]>

* test/openssl/test_ssl.rb: Reuse TLS default options from
OpenSSL::SSL::SSLContext::DEFAULT_PARAMS.

Thu Mar 6 10:33:31 2014 Martin Bosslet <[email protected]>
Wed Oct 22 23:02:49 2014 Martin Bosslet <[email protected]>

* lib/openssl/ssl.rb: Explicitly whitelist the default
SSL/TLS ciphers. Forbid SSLv2 and SSLv3, disable
compression by default.
Reported by Jeff Hodges.
[ruby-core:59829] [Bug #9424]

Sun Oct 19 03:22:53 2014 Kazuki Tsujimoto <[email protected]>

* vm_core.h, vm.c, proc.c: fix GC mark miss on bindings.
[ruby-dev:48616] [Bug #10368]

* test/ruby/test_eval.rb: add a test code.

Sun Oct 19 03:13:38 2014 Nobuyoshi Nakada <[email protected]>

* parse.y (parser_here_document): do not append already appended
and disposed code fragment. [ruby-dev:48647] [Bug #10392]

Thu Oct 16 22:10:11 2014 Nobuyoshi Nakada <[email protected]>

* ext/stringio/stringio.c (strio_write): ASCII-8BIT StringIO
should be writable any encoding strings, without conversion.
[ruby-core:65240] [Bug #10285]

Thu Oct 16 22:06:03 2014 Nobuyoshi Nakada <[email protected]>

* vm_eval.c (eval_string_with_cref): fix super from eval with
scope. set klass in the current control frame to the class of
the receiver in the context to be evaluated, this class/module
must match the actual receiver to call super.
[ruby-core:65122] [Bug #10263]

Thu Oct 16 00:30:30 2014 Tanaka Akira <[email protected]>

* lib/find.rb (Find.find): Call to_path for arguments to obtain
strings.
[ruby-core:63713] [Bug #10035] Reported by Herwin.

Thu Oct 16 00:20:12 2014 Eric Wong <[email protected]>

* object.c (rb_class_real): do not dereference 0 VALUE

* test/ruby/test_module.rb (test_inspect_segfault):
Test case and bug report by Thomas Stratmann.
[ruby-core:65214] [Bug #10282]

Thu Oct 16 00:10:45 2014 Nobuyoshi Nakada <[email protected]>

* signal.c (rb_f_kill): get rid of deadlock as unhandled and
discarded signals do not make interrupt_cond signaled.
based on the patch by Kazuki Tsujimoto at [ruby-dev:48606].
[Bug #9820]

Thu Oct 16 00:10:45 2014 Nobuyoshi Nakada <[email protected]>

* signal.c (rb_f_kill): should not ignore signal unless the
default handler is registered. [ruby-dev:48592] [Bug #9820]

Wed Oct 15 23:58:13 2014 CHIKANAGA Tomoyuki <[email protected]>

merge r47598 partially. extracted commits are as follows. [Bug #9728]
https://github.com/k-takata/Onigmo/commit/15ddec6d18e27fdc1988236764e766fd5892ecf5

Wed Oct 15 23:50:33 2014 SHIBATA Hiroshi <[email protected]>

* lib/fileutils.rb: handle ENOENT error with symlink targeted to
non-exists file. [ruby-dev:45933] [Bug #6716]

Wed Oct 15 23:25:24 2014 NARUSE, Yui <[email protected]>

* configure.in: NetBSD's ksh, used by configure, needs escapes.

Wed Oct 15 23:13:43 2014 Eric Wong <[email protected]>

* array.c (ary_recycle_hash): add RB_GC_GUARD
(rb_ary_diff): remove volatile
[Bug #10369]

Wed Oct 15 23:10:07 2014 Nobuyoshi Nakada <[email protected]>

* dir.c (dir_s_aref): fix rdoc. `Dir.glob` allows an array but
`Dir[]` not. the former accepts an optional parameter `flags`,
while the latter accepts arbitrary number of arguments but no
`flags`. [ruby-core:65265] [Bug #10294]

Wed Oct 15 23:08:02 2014 Rei Odaira <[email protected]>

* configure.in: Fix typo. [Bug #9914]

Wed Oct 15 22:46:52 2014 NAKAMURA Usaku <[email protected]>

* error.c: update exception tree. [DOC]
reported by @hemge via twitter.

Wed Sep 24 02:30:55 2014 Nobuyoshi Nakada <[email protected]>

* parse.y (parse_ident): just after a label, new expression should
start, cannot be a modifier. [ruby-core:65211] [Bug #10279]

Wed Sep 24 02:21:41 2014 NAKAMURA Usaku <[email protected]>

* win32/Makefile.sub (VCSUP): nothing to do if this worktree is not
under any VCS (it means that the worktree may be from the release
package).

Wed Sep 24 02:06:33 2014 Tanaka Akira <[email protected]>

* test/ruby/test_time_tz.rb: Fix test error with tzdata-2014g.
[ruby-core:65058] [Bug #10245] Reported by Vit Ondruch.

Wed Sep 24 02:06:33 2014 SHIBATA Hiroshi <[email protected]>

* test/minitest/test_minitest_unit.rb: removed obsoleted condition
for Ruby 1.8.
* test/ruby/test_time_tz.rb: ditto.

Wed Sep 24 01:43:13 2014 CHIKANAGA Tomoyuki <[email protected]>

* version.h (RUBY_VERSION): bump RUBY_VERSION to 2.1.4.

Fri Sep 19 00:58:34 2014 CHIKANAGA Tomoyuki <[email protected]>

* version.h (RUBY_VERSION): bump RUBY_VERSION to 2.1.3.
Expand Down
3 changes: 2 additions & 1 deletion array.c
Original file line number Diff line number Diff line change
Expand Up @@ -3949,6 +3949,7 @@ ary_recycle_hash(VALUE hash)
RHASH(hash)->ntbl = 0;
st_free_table(tbl);
}
RB_GC_GUARD(hash);
}

/*
Expand All @@ -3972,7 +3973,7 @@ static VALUE
rb_ary_diff(VALUE ary1, VALUE ary2)
{
VALUE ary3;
volatile VALUE hash;
VALUE hash;
long i;

hash = ary_make_hash(to_ary(ary2));
Expand Down
4 changes: 3 additions & 1 deletion class.c
Original file line number Diff line number Diff line change
Expand Up @@ -1878,10 +1878,12 @@ NORETURN(static void unknown_keyword_error(VALUE hash, const ID *table, int keyw
static void
unknown_keyword_error(VALUE hash, const ID *table, int keywords)
{
st_table *tbl = rb_hash_tbl_raw(hash);
VALUE keys;
int i;
for (i = 0; i < keywords; i++) {
rb_hash_delete(hash, ID2SYM(table[i]));
st_data_t key = ID2SYM(table[i]);
st_delete(tbl, &key, NULL);
}
keys = rb_funcall(hash, rb_intern("keys"), 0, 0);
if (!RB_TYPE_P(keys, T_ARRAY)) rb_raise(rb_eArgError, "unknown keyword");
Expand Down
4 changes: 2 additions & 2 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ AS_CASE(["$target_os"],
[
# AIX currently does not support a 32-bit call to posix_fadvise()
# if _LARGE_FILES is defined.
ac_cv_posix_fadvise=no
ac_cv_func_posix_fadvise=no
])
])

Expand Down Expand Up @@ -2092,7 +2092,7 @@ if test x$setjmp_prefix = xsig; then
else
unset setjmp_sigmask
fi
AC_MSG_RESULT(${setjmp_prefix}setjmp${setjmp_suffix}${setjmp_cast:+($setjmp_cast)})
AC_MSG_RESULT(${setjmp_prefix}setjmp${setjmp_suffix}${setjmp_cast:+\($setjmp_cast\)})
AC_DEFINE_UNQUOTED([RUBY_SETJMP(env)], [${setjmp_prefix}setjmp${setjmp_suffix}($setjmp_cast(env)${setjmp_sigmask+,0})])
AC_DEFINE_UNQUOTED([RUBY_LONGJMP(env,val)], [${setjmp_prefix}longjmp($setjmp_cast(env),val)])
AC_DEFINE_UNQUOTED(RUBY_JMP_BUF, ${setjmp_sigmask+${setjmp_prefix}}jmp_buf)
Expand Down
2 changes: 0 additions & 2 deletions dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1784,11 +1784,9 @@ dir_globs(long argc, const VALUE *argv, int flags)

/*
* call-seq:
* Dir[ array ] -> array
* Dir[ string [, string ...] ] -> array
*
* Equivalent to calling
* <code>Dir.glob(</code><i>array,</i><code>0)</code> and
* <code>Dir.glob([</code><i>string,...</i><code>],0)</code>.
*
*/
Expand Down
11 changes: 7 additions & 4 deletions error.c
Original file line number Diff line number Diff line change
Expand Up @@ -1740,29 +1740,32 @@ syserr_eqq(VALUE self, VALUE exc)
* * LoadError
* * NotImplementedError
* * SyntaxError
* * SecurityError
* * SignalException
* * Interrupt
* * StandardError -- default for +rescue+
* * ArgumentError
* * IndexError
* * StopIteration
* * EncodingError
* * FiberError
* * IOError
* * EOFError
* * IndexError
* * KeyError
* * StopIteration
* * LocalJumpError
* * NameError
* * NoMethodError
* * RangeError
* * FloatDomainError
* * RegexpError
* * RuntimeError -- default for +raise+
* * SecurityError
* * SystemCallError
* * Errno::*
* * SystemStackError
* * ThreadError
* * TypeError
* * ZeroDivisionError
* * SystemExit
* * SystemStackError
* * fatal -- impossible to rescue
*/

Expand Down
1 change: 1 addition & 0 deletions ext/openssl/lib/openssl/ssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class SSLContext
opts |= OpenSSL::SSL::OP_NO_COMPRESSION if defined?(OpenSSL::SSL::OP_NO_COMPRESSION)
opts |= OpenSSL::SSL::OP_NO_SSLv2 if defined?(OpenSSL::SSL::OP_NO_SSLv2)
opts |= OpenSSL::SSL::OP_NO_SSLv3 if defined?(OpenSSL::SSL::OP_NO_SSLv3)
opts
}.call
}

Expand Down
12 changes: 9 additions & 3 deletions lib/fileutils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,8 @@ def install(src, dest, options = {})
fu_check_options options, OPT_TABLE['install']
fu_output_message "install -c#{options[:preserve] && ' -p'}#{options[:mode] ? (' -m 0%o' % options[:mode]) : ''} #{[src,dest].flatten.join ' '}" if options[:verbose]
return if options[:noop]
fu_each_src_dest(src, dest) do |s, d, st|
fu_each_src_dest(src, dest) do |s, d|
st = File.stat(s)
unless File.exist?(d) and compare_file(s, d)
remove_file d, true
copy_file s, d
Expand Down Expand Up @@ -1252,7 +1253,12 @@ def dereference?
end

def exist?
lstat! ? true : false
begin
lstat
true
rescue Errno::ENOENT
false
end
end

def file?
Expand Down Expand Up @@ -1570,7 +1576,7 @@ def fu_list(arg) #:nodoc:
def fu_each_src_dest(src, dest) #:nodoc:
fu_each_src_dest0(src, dest) do |s, d|
raise ArgumentError, "same file: #{s} and #{d}" if fu_same?(s, d)
yield s, d, File.stat(s)
yield s, d
end
end
private_module_function :fu_each_src_dest
Expand Down
1 change: 1 addition & 0 deletions lib/find.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def find(*paths) # :yield: path
fs_encoding = Encoding.find("filesystem")

paths.collect!{|d| raise Errno::ENOENT unless File.exist?(d); d.dup}.each do |path|
path = path.to_path if path.respond_to? :to_path
enc = path.encoding == Encoding::US_ASCII ? fs_encoding : path.encoding
ps = [path]
while file = ps.shift
Expand Down
6 changes: 6 additions & 0 deletions lib/rexml/entity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,14 @@ def value
matches = @value.scan(PEREFERENCE_RE)
rv = @value.clone
if @parent
sum = 0
matches.each do |entity_reference|
entity_value = @parent.entity( entity_reference[0] )
if sum + entity_value.bytesize > Security.entity_expansion_text_limit
raise "entity expansion has grown too large"
else
sum += entity_value.bytesize
end
rv.gsub!( /%#{entity_reference.join};/um, entity_value )
end
end
Expand Down
5 changes: 2 additions & 3 deletions object.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,8 @@ rb_obj_not_equal(VALUE obj1, VALUE obj2)
VALUE
rb_class_real(VALUE cl)
{
if (cl == 0)
return 0;
while ((RBASIC(cl)->flags & FL_SINGLETON) || BUILTIN_TYPE(cl) == T_ICLASS) {
while (cl &&
((RBASIC(cl)->flags & FL_SINGLETON) || BUILTIN_TYPE(cl) == T_ICLASS)) {
cl = RCLASS_SUPER(cl);
}
return cl;
Expand Down
5 changes: 4 additions & 1 deletion parse.y
Original file line number Diff line number Diff line change
Expand Up @@ -6547,7 +6547,10 @@ parser_here_document(struct parser_params *parser, NODE *here)
if (pend < lex_pend) rb_str_cat(str, "\n", 1);
lex_goto_eol(parser);
if (nextc() == -1) {
if (str) dispose_string(str);
if (str) {
dispose_string(str);
str = 0;
}
goto error;
}
} while (!whole_match_p(eos, len, indent));
Expand Down
Loading

0 comments on commit 25de41c

Please sign in to comment.