Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 25de41c

Browse files
committed
Merge tag 'v2_1_4' into dbussink-ruby-2-1-4
Conflicts: ChangeLog ext/openssl/lib/openssl/ssl.rb
2 parents 5d491fe + e966a41 commit 25de41c

34 files changed

+496
-120
lines changed

ChangeLog

+136-9
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,154 @@
1-
Fri Sep 26 12:52:36 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
1+
Mon Oct 27 20:20:14 2014 NAKAMURA Usaku <usa@ruby-lang.org>
22

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

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

9-
* parse.y (parse_ident): just after a label, new expression should
10-
start, cannot be a modifier. [ruby-core:65211] [Bug #10279]
9+
* vm_method.c (rb_method_entry_make): warn redefinition only for
10+
already defined methods, but not for undefined methods.
11+
[ruby-dev:48691] [Bug #10421]
12+
13+
Sun Oct 26 03:21:30 2014 Nobuyoshi Nakada <[email protected]>
14+
15+
* class.c (unknown_keyword_error): delete expected keywords
16+
directly from raw table, so that the given block is not called.
17+
[ruby-core:65837] [Bug #10413]
1118

12-
Fri Mar 7 12:06:19 2014 Martin Bosslet <[email protected]>
19+
Wed Oct 22 23:02:49 2014 CHIKANAGA Tomoyuki <[email protected]>
20+
21+
* ext/openssl/lib/openssl/ssl.rb (DEFAULT_PARAMS): override
22+
options even if OpenSSL::SSL::OP_NO_SSLv3 is not defined.
23+
this is pointed out by Stephen Touset. [ruby-core:65711] [Bug #9424]
24+
25+
Wed Oct 22 23:02:49 2014 Martin Bosslet <[email protected]>
1326

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

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

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

38+
Sun Oct 19 03:22:53 2014 Kazuki Tsujimoto <[email protected]>
39+
40+
* vm_core.h, vm.c, proc.c: fix GC mark miss on bindings.
41+
[ruby-dev:48616] [Bug #10368]
42+
43+
* test/ruby/test_eval.rb: add a test code.
44+
45+
Sun Oct 19 03:13:38 2014 Nobuyoshi Nakada <[email protected]>
46+
47+
* parse.y (parser_here_document): do not append already appended
48+
and disposed code fragment. [ruby-dev:48647] [Bug #10392]
49+
50+
Thu Oct 16 22:10:11 2014 Nobuyoshi Nakada <[email protected]>
51+
52+
* ext/stringio/stringio.c (strio_write): ASCII-8BIT StringIO
53+
should be writable any encoding strings, without conversion.
54+
[ruby-core:65240] [Bug #10285]
55+
56+
Thu Oct 16 22:06:03 2014 Nobuyoshi Nakada <[email protected]>
57+
58+
* vm_eval.c (eval_string_with_cref): fix super from eval with
59+
scope. set klass in the current control frame to the class of
60+
the receiver in the context to be evaluated, this class/module
61+
must match the actual receiver to call super.
62+
[ruby-core:65122] [Bug #10263]
63+
64+
Thu Oct 16 00:30:30 2014 Tanaka Akira <[email protected]>
65+
66+
* lib/find.rb (Find.find): Call to_path for arguments to obtain
67+
strings.
68+
[ruby-core:63713] [Bug #10035] Reported by Herwin.
69+
70+
Thu Oct 16 00:20:12 2014 Eric Wong <[email protected]>
71+
72+
* object.c (rb_class_real): do not dereference 0 VALUE
73+
74+
* test/ruby/test_module.rb (test_inspect_segfault):
75+
Test case and bug report by Thomas Stratmann.
76+
[ruby-core:65214] [Bug #10282]
77+
78+
Thu Oct 16 00:10:45 2014 Nobuyoshi Nakada <[email protected]>
79+
80+
* signal.c (rb_f_kill): get rid of deadlock as unhandled and
81+
discarded signals do not make interrupt_cond signaled.
82+
based on the patch by Kazuki Tsujimoto at [ruby-dev:48606].
83+
[Bug #9820]
84+
85+
Thu Oct 16 00:10:45 2014 Nobuyoshi Nakada <[email protected]>
86+
87+
* signal.c (rb_f_kill): should not ignore signal unless the
88+
default handler is registered. [ruby-dev:48592] [Bug #9820]
89+
90+
Wed Oct 15 23:58:13 2014 CHIKANAGA Tomoyuki <[email protected]>
91+
92+
merge r47598 partially. extracted commits are as follows. [Bug #9728]
93+
https://github.com/k-takata/Onigmo/commit/15ddec6d18e27fdc1988236764e766fd5892ecf5
94+
95+
Wed Oct 15 23:50:33 2014 SHIBATA Hiroshi <[email protected]>
96+
97+
* lib/fileutils.rb: handle ENOENT error with symlink targeted to
98+
non-exists file. [ruby-dev:45933] [Bug #6716]
99+
100+
Wed Oct 15 23:25:24 2014 NARUSE, Yui <[email protected]>
101+
102+
* configure.in: NetBSD's ksh, used by configure, needs escapes.
103+
104+
Wed Oct 15 23:13:43 2014 Eric Wong <[email protected]>
105+
106+
* array.c (ary_recycle_hash): add RB_GC_GUARD
107+
(rb_ary_diff): remove volatile
108+
[Bug #10369]
109+
110+
Wed Oct 15 23:10:07 2014 Nobuyoshi Nakada <[email protected]>
111+
112+
* dir.c (dir_s_aref): fix rdoc. `Dir.glob` allows an array but
113+
`Dir[]` not. the former accepts an optional parameter `flags`,
114+
while the latter accepts arbitrary number of arguments but no
115+
`flags`. [ruby-core:65265] [Bug #10294]
116+
117+
Wed Oct 15 23:08:02 2014 Rei Odaira <[email protected]>
118+
119+
* configure.in: Fix typo. [Bug #9914]
120+
121+
Wed Oct 15 22:46:52 2014 NAKAMURA Usaku <[email protected]>
122+
123+
* error.c: update exception tree. [DOC]
124+
reported by @hemge via twitter.
125+
126+
Wed Sep 24 02:30:55 2014 Nobuyoshi Nakada <[email protected]>
127+
128+
* parse.y (parse_ident): just after a label, new expression should
129+
start, cannot be a modifier. [ruby-core:65211] [Bug #10279]
130+
131+
Wed Sep 24 02:21:41 2014 NAKAMURA Usaku <[email protected]>
132+
133+
* win32/Makefile.sub (VCSUP): nothing to do if this worktree is not
134+
under any VCS (it means that the worktree may be from the release
135+
package).
136+
137+
Wed Sep 24 02:06:33 2014 Tanaka Akira <[email protected]>
138+
139+
* test/ruby/test_time_tz.rb: Fix test error with tzdata-2014g.
140+
[ruby-core:65058] [Bug #10245] Reported by Vit Ondruch.
141+
142+
Wed Sep 24 02:06:33 2014 SHIBATA Hiroshi <[email protected]>
143+
144+
* test/minitest/test_minitest_unit.rb: removed obsoleted condition
145+
for Ruby 1.8.
146+
* test/ruby/test_time_tz.rb: ditto.
147+
148+
Wed Sep 24 01:43:13 2014 CHIKANAGA Tomoyuki <[email protected]>
149+
150+
* version.h (RUBY_VERSION): bump RUBY_VERSION to 2.1.4.
151+
25152
Fri Sep 19 00:58:34 2014 CHIKANAGA Tomoyuki <[email protected]>
26153

27154
* version.h (RUBY_VERSION): bump RUBY_VERSION to 2.1.3.

array.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -3949,6 +3949,7 @@ ary_recycle_hash(VALUE hash)
39493949
RHASH(hash)->ntbl = 0;
39503950
st_free_table(tbl);
39513951
}
3952+
RB_GC_GUARD(hash);
39523953
}
39533954

39543955
/*
@@ -3972,7 +3973,7 @@ static VALUE
39723973
rb_ary_diff(VALUE ary1, VALUE ary2)
39733974
{
39743975
VALUE ary3;
3975-
volatile VALUE hash;
3976+
VALUE hash;
39763977
long i;
39773978

39783979
hash = ary_make_hash(to_ary(ary2));

class.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -1878,10 +1878,12 @@ NORETURN(static void unknown_keyword_error(VALUE hash, const ID *table, int keyw
18781878
static void
18791879
unknown_keyword_error(VALUE hash, const ID *table, int keywords)
18801880
{
1881+
st_table *tbl = rb_hash_tbl_raw(hash);
18811882
VALUE keys;
18821883
int i;
18831884
for (i = 0; i < keywords; i++) {
1884-
rb_hash_delete(hash, ID2SYM(table[i]));
1885+
st_data_t key = ID2SYM(table[i]);
1886+
st_delete(tbl, &key, NULL);
18851887
}
18861888
keys = rb_funcall(hash, rb_intern("keys"), 0, 0);
18871889
if (!RB_TYPE_P(keys, T_ARRAY)) rb_raise(rb_eArgError, "unknown keyword");

configure.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,7 @@ AS_CASE(["$target_os"],
11651165
[
11661166
# AIX currently does not support a 32-bit call to posix_fadvise()
11671167
# if _LARGE_FILES is defined.
1168-
ac_cv_posix_fadvise=no
1168+
ac_cv_func_posix_fadvise=no
11691169
])
11701170
])
11711171

@@ -2092,7 +2092,7 @@ if test x$setjmp_prefix = xsig; then
20922092
else
20932093
unset setjmp_sigmask
20942094
fi
2095-
AC_MSG_RESULT(${setjmp_prefix}setjmp${setjmp_suffix}${setjmp_cast:+($setjmp_cast)})
2095+
AC_MSG_RESULT(${setjmp_prefix}setjmp${setjmp_suffix}${setjmp_cast:+\($setjmp_cast\)})
20962096
AC_DEFINE_UNQUOTED([RUBY_SETJMP(env)], [${setjmp_prefix}setjmp${setjmp_suffix}($setjmp_cast(env)${setjmp_sigmask+,0})])
20972097
AC_DEFINE_UNQUOTED([RUBY_LONGJMP(env,val)], [${setjmp_prefix}longjmp($setjmp_cast(env),val)])
20982098
AC_DEFINE_UNQUOTED(RUBY_JMP_BUF, ${setjmp_sigmask+${setjmp_prefix}}jmp_buf)

dir.c

-2
Original file line numberDiff line numberDiff line change
@@ -1784,11 +1784,9 @@ dir_globs(long argc, const VALUE *argv, int flags)
17841784

17851785
/*
17861786
* call-seq:
1787-
* Dir[ array ] -> array
17881787
* Dir[ string [, string ...] ] -> array
17891788
*
17901789
* Equivalent to calling
1791-
* <code>Dir.glob(</code><i>array,</i><code>0)</code> and
17921790
* <code>Dir.glob([</code><i>string,...</i><code>],0)</code>.
17931791
*
17941792
*/

error.c

+7-4
Original file line numberDiff line numberDiff line change
@@ -1740,29 +1740,32 @@ syserr_eqq(VALUE self, VALUE exc)
17401740
* * LoadError
17411741
* * NotImplementedError
17421742
* * SyntaxError
1743+
* * SecurityError
17431744
* * SignalException
17441745
* * Interrupt
17451746
* * StandardError -- default for +rescue+
17461747
* * ArgumentError
1747-
* * IndexError
1748-
* * StopIteration
1748+
* * EncodingError
1749+
* * FiberError
17491750
* * IOError
17501751
* * EOFError
1752+
* * IndexError
1753+
* * KeyError
1754+
* * StopIteration
17511755
* * LocalJumpError
17521756
* * NameError
17531757
* * NoMethodError
17541758
* * RangeError
17551759
* * FloatDomainError
17561760
* * RegexpError
17571761
* * RuntimeError -- default for +raise+
1758-
* * SecurityError
17591762
* * SystemCallError
17601763
* * Errno::*
1761-
* * SystemStackError
17621764
* * ThreadError
17631765
* * TypeError
17641766
* * ZeroDivisionError
17651767
* * SystemExit
1768+
* * SystemStackError
17661769
* * fatal -- impossible to rescue
17671770
*/
17681771

ext/openssl/lib/openssl/ssl.rb

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ class SSLContext
6464
opts |= OpenSSL::SSL::OP_NO_COMPRESSION if defined?(OpenSSL::SSL::OP_NO_COMPRESSION)
6565
opts |= OpenSSL::SSL::OP_NO_SSLv2 if defined?(OpenSSL::SSL::OP_NO_SSLv2)
6666
opts |= OpenSSL::SSL::OP_NO_SSLv3 if defined?(OpenSSL::SSL::OP_NO_SSLv3)
67+
opts
6768
}.call
6869
}
6970

lib/fileutils.rb

+9-3
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,8 @@ def install(src, dest, options = {})
854854
fu_check_options options, OPT_TABLE['install']
855855
fu_output_message "install -c#{options[:preserve] && ' -p'}#{options[:mode] ? (' -m 0%o' % options[:mode]) : ''} #{[src,dest].flatten.join ' '}" if options[:verbose]
856856
return if options[:noop]
857-
fu_each_src_dest(src, dest) do |s, d, st|
857+
fu_each_src_dest(src, dest) do |s, d|
858+
st = File.stat(s)
858859
unless File.exist?(d) and compare_file(s, d)
859860
remove_file d, true
860861
copy_file s, d
@@ -1252,7 +1253,12 @@ def dereference?
12521253
end
12531254

12541255
def exist?
1255-
lstat! ? true : false
1256+
begin
1257+
lstat
1258+
true
1259+
rescue Errno::ENOENT
1260+
false
1261+
end
12561262
end
12571263

12581264
def file?
@@ -1570,7 +1576,7 @@ def fu_list(arg) #:nodoc:
15701576
def fu_each_src_dest(src, dest) #:nodoc:
15711577
fu_each_src_dest0(src, dest) do |s, d|
15721578
raise ArgumentError, "same file: #{s} and #{d}" if fu_same?(s, d)
1573-
yield s, d, File.stat(s)
1579+
yield s, d
15741580
end
15751581
end
15761582
private_module_function :fu_each_src_dest

lib/find.rb

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def find(*paths) # :yield: path
4040
fs_encoding = Encoding.find("filesystem")
4141

4242
paths.collect!{|d| raise Errno::ENOENT unless File.exist?(d); d.dup}.each do |path|
43+
path = path.to_path if path.respond_to? :to_path
4344
enc = path.encoding == Encoding::US_ASCII ? fs_encoding : path.encoding
4445
ps = [path]
4546
while file = ps.shift

lib/rexml/entity.rb

+6
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,14 @@ def value
138138
matches = @value.scan(PEREFERENCE_RE)
139139
rv = @value.clone
140140
if @parent
141+
sum = 0
141142
matches.each do |entity_reference|
142143
entity_value = @parent.entity( entity_reference[0] )
144+
if sum + entity_value.bytesize > Security.entity_expansion_text_limit
145+
raise "entity expansion has grown too large"
146+
else
147+
sum += entity_value.bytesize
148+
end
143149
rv.gsub!( /%#{entity_reference.join};/um, entity_value )
144150
end
145151
end

object.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,8 @@ rb_obj_not_equal(VALUE obj1, VALUE obj2)
203203
VALUE
204204
rb_class_real(VALUE cl)
205205
{
206-
if (cl == 0)
207-
return 0;
208-
while ((RBASIC(cl)->flags & FL_SINGLETON) || BUILTIN_TYPE(cl) == T_ICLASS) {
206+
while (cl &&
207+
((RBASIC(cl)->flags & FL_SINGLETON) || BUILTIN_TYPE(cl) == T_ICLASS)) {
209208
cl = RCLASS_SUPER(cl);
210209
}
211210
return cl;

parse.y

+4-1
Original file line numberDiff line numberDiff line change
@@ -6547,7 +6547,10 @@ parser_here_document(struct parser_params *parser, NODE *here)
65476547
if (pend < lex_pend) rb_str_cat(str, "\n", 1);
65486548
lex_goto_eol(parser);
65496549
if (nextc() == -1) {
6550-
if (str) dispose_string(str);
6550+
if (str) {
6551+
dispose_string(str);
6552+
str = 0;
6553+
}
65516554
goto error;
65526555
}
65536556
} while (!whole_match_p(eos, len, indent));

0 commit comments

Comments
 (0)