Commit graph

5265 commits

Author SHA1 Message Date
usa
5c57eb834a merge revision(s) 60421: [Backport #14047]
win32.c: unknown reparse tags

	* win32/win32.c (rb_w32_read_reparse_point): skip unknown reparse
	  tags.  [ruby-core:83539] [Bug #14047]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-18 15:35:03 +00:00
usa
f8b4df93d2 merge revision(s) 60666,60667,60668: [Backport #14082]
Fix size on Enumerable#cycle when the size is 0 [Bug #14082].

	Patch by Kenichi Kamiya

	test/ruby/test_lazy_enumerator.rb: test for [Bug #14082]

	enum.c: check argument first

	* enum.c (enum_cycle_size): check an argument before the size of
	  the receiver, if it is given.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-18 15:33:37 +00:00
usa
091f98cf8c merge revision(s) 53573: [Backport #11989]
* parse.y (parser_here_document): an escaped newline is not an
	  actual newline, and the rest part should not be dedented.
	  [ruby-core:72855] [Bug #11989]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-18 15:29:37 +00:00
usa
ca310ba6f7 merge revision(s) 60384: [Backport #13887]
thread_pthread: do not corrupt stack

	This fixes stuck test/ruby/test_io.rb with FIBER_USE_NATIVE=0 on
	GNU/Linux because linked-list pointers used by glibc get
	corrupted when fiber stacks are copied.

	Thanks to wanabe for finding the bug and original patch.

	* thread_pthread (native_thread_init_stack): fix stack corruption
	  [ruby-core:82737] [Bug #13387]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-18 15:27:34 +00:00
usa
e9a9f674fb merge revision(s) 60437: [Backport #14057]
TracePoint#enable, #disable: Don't yield any argument. [Bug #14057]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-18 15:23:34 +00:00
usa
fdb2421c21 merge revision(s) 60294: [Backport #11638]
Clarify the behavior of IO.write without offset in write mode.

	  https://github.com/ruby/ruby/pull/1571

	  Patch by @takanabe [fix GH-1571]
	  [Bug #11638][ruby-core:71277]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-18 15:21:39 +00:00
usa
c17242100c merge revision(s) 60160: [Backport #13998]
parse.y: token info with BOM

	* parse.y (parser_prepare): set token_info_enabled flag first,
	  before returning at BOM.  [ruby-dev:50288] [Bug #13998]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-18 15:16:52 +00:00
usa
541f4f2502 merge revision(s) 60055: [Backport #13856]
io.c: fix segfault with closing socket on Windows

	* io.c (fptr_finalize_flush): add an argument to keep GVL.
	* io.c (fptr_finalize): adjust for above change.
	* io.c (io_close_fptr): closing without GVL causes another
	  exception while raising exception in another thread. This causes
	  segfault on Windows. Keep GVL while closing when another thread
	  raises.
	  [Bug #13856] [ruby-core:82602]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-18 15:07:24 +00:00
usa
bec19f4962 merge revision(s) 55372: [Backport #14179]
* lib/forwardable.rb (_delegator_method): leave the backtrace
	  untouched during accessor.  forwardable.rb does not appear in
	  the backtrace during delegated method because of tail-call
	  optimization.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-18 15:04:49 +00:00
svn
57647b8a97 * 2018-03-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-18 15:00:47 +00:00
usa
1816ba0922 merge revision(s) 60000,60001,60002: [Backport #13925]
dup String#partition return value

	* string.c (rb_str_partition): return duplicated receiver, when no
	  splits.  [ruby-core:82911] [Bug#13925]

	Author:    Seiei Miyagi <hanachin@gmail.com>

	dup String#rpartition return value

	* string.c (rb_str_rpartition): return duplicated receiver, when
	  no splits.  [ruby-core:82911] [Bug#13925]

	Author:    Seiei Miyagi <hanachin@gmail.com>

	dup String#split return value

	* string.c (rb_str_split): return duplicated receiver, when no
	  splits.  patched by tompng (tomoya ishida) in [ruby-core:82911],
	  and the test case by Seiei Miyagi <hanachin@gmail.com>.
	  [Bug#13925] [Fix GH-1705]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-18 15:00:46 +00:00
usa
4afc46dc8c merge revision(s) 59970: [Backport #13736]
ruby.c: paragraph mode by -00

	* ruby.c (proc_options): set to paragraph mode, if -00 is given,
	  as well as perl and -R0 option in 0.49.
	  [ruby-core:81987] [Bug #13736]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-18 14:58:07 +00:00
usa
cfb61e5962 merge revision(s) 59975: [Backport #13916]
process: block/unblock signals around fork

	As with forking for execve(2) in `spawn', we must block signals
	to ensure they are handled correctly in a freshly `fork'-ed child.

	* process.c (retry_fork_ruby): block/unblock signals around fork
	  (rb_fork_ruby): re-enable signals in forked child
	* test/ruby/test_process.rb (test_forked_child_signal): new test
	  [ruby-core:82883] [Bug #13916]

	  Thanks to Russell Davis for the bug report and test case.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-18 14:56:08 +00:00
usa
2fd7044e9a merge revision(s) 59956: [Backport #13705]
vm.c: fix `cfp consistency error' which occurs
	when raising exception in bmethod call event

	* vm.c (invoke_bmethod): set FINISH flag just before calling vm_exec.
	  [ruby-dev:50162] [Bug #13705]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-18 14:53:26 +00:00
usa
cc23dc6b23 merge revision(s) 59602,59887: [Backport #13816]
High Sierra's APFS cannot use invalid filenames [Bug #13816]

	added workaround for APFS file format.

	  * TestFileExhaustive#test_atime: It fails with nano-sec precise.
	    I changed to use unixtime for this assertion for APFS.
	  * TestFileExhaustive#test_expand_path: skip assertion when given
	    invalid charactor on APFS.

	  [Bug #13816][ruby-core:82383]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-18 14:39:41 +00:00
usa
685061590b merge revision(s) 58431,58447: [Backport #13489]
test_framework.rb: for case-sensitive filesystem

	* test/mkmf/test_framework.rb (test_single_framework): fix header
	  file name for case-sensitive filesystem.  it may not be same as
	  the framework name, but should be the actual file name.
	  [ruby-dev:50093] [Bug #13489]

	* test/mkmf/test_framework.rb (test_multi_frameworks): ditto.

	test_file_exhaustive.rb: check case-sensitive fs

	* test/ruby/test_file_exhaustive.rb (test_expand_path): dump
	  expanded file name, not only appended char, for case-sensitive
	  filesystem.  [ruby-dev:50093] [Bug #13489]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-18 14:34:17 +00:00
usa
1521768c2c merge revision(s) 59867: [Backport #13894]
test/win32ole/test_word.rb: word quit without confirmation dialog to save 
	files. [Bug #13894] Thanks to h.shirosaki.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-18 14:30:49 +00:00
usa
d9a7903c66 merge revision(s) 59893,59922: [Backport #13895]
fix the case High Sierra's mincore(2) may return -128 [Bug #13895]

	Fix typos [ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-18 14:27:12 +00:00
usa
148f1b9117 merge revision(s) 58769,59710,59712: [Backport #13566]
Treat NULL reference case [Bug #13566]

	Fix C level backtrace on Darwin

	SEGV caused by invalid instruction call.

	skip unless PLATFORM is darwin.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-18 14:25:01 +00:00
usa
89ceb340ac merge revision(s) 53798,59454,59954: [Backport #14118]
* configure.in (ARFLAGS): check if deterministic mode flag is
	  effective, which is on by default on Ubuntu.


	configure.in: use libtool

	* configure.in: use libtool on macOS to suppress a warning against
	  debug_counter.o, which has no symbols unless USE_DEBUG_COUNTER
	  is set to non-zero.

	configure.in: use newer libtool only

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-18 14:15:27 +00:00
usa
8602707d1a merge revision(s) 62506,62508: [Backport #14438]
test_time_tz.rb: past Japanese DST tzdata fix

	* test/ruby/test_time_tz.rb (TestTimeTZ#test_asia_tokyo): follow
	  the tzdata 2018 fix of Japanese DST transitions (1948-1951).
	  [ruby-core:85373] [Bug #14438]

	test_time_tz.rb: past Japanese DST tzdata fix

	* test/ruby/test_time_tz.rb (TestTimeTZ#test_asia_tokyo): fix
	  the expected data at the end of DST.  [Bug #14438]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-18 13:56:55 +00:00
usa
e4317b5ed9 merge revision(s) 62422,62436: [Backport #14481]
Merge RubyGems 2.7.6 from upstream.

	It fixed some security vulnerabilities.

	http://blog.rubygems.org/2018/02/15/2.7.6-released.html

	fix regexp literal warning.

	* test/rubygems/test_gem_server.rb: eliminate duplicated character class warning.
	  [Bug #14481]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-16 16:34:01 +00:00
usa
08fb5c2153 merge revision(s) 58471,58493,62436: [Backport #13505]
load.c: backtrace of circular require

	* load.c (load_lock): print backtrace of circular require via
	  `Warning.warn` [ruby-core:80850] [Bug #13505]

	  Send the backtrace of the circular require warning as a single String to Warning.warn

	* load.c: send as a single string.
	* error.c: expose the string formatted by rb_warning as rb_warning_string().
	* test/ruby/test_exception.rb: update tests.
	  [ruby-core:80850] [Bug #13505]

	fix regexp literal warning.

	* test/rubygems/test_gem_server.rb: eliminate duplicated character class warning.
	  [Bug #14481]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-16 16:21:44 +00:00
usa
8bc9c80bcb merge revision(s) 53727: [Backport #14428]
Remove debug print introduced in r52386

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 19:01:50 +00:00
usa
766c3744f4 merge revision(s) 60182: [Backport #14009]
configure.ac: link Foundation framework

	* configure.ac (XLDFLAGS): link against Foundation framework and
	  let __NSPlaceholderDictionary initialize, to get rid of crash
	  after fork on macOS High Sierra.  [ruby-core:83239] [Bug #14009]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 13:58:12 +00:00
usa
4cc2435aa7 merge revision(s) 56285: [Backport #14354]
* thread_sync.c (Init_thread_sync): Remove confusing doc comments,
	  which are picked up by rdoc unexpectedly, from Queue and
	  SizedQueue.  [Fix GH-1450]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 13:52:40 +00:00
usa
c5a99cf3c0 merge revision(s) 60079: [Backport #13794]
thread_pthread.c: do not wakeup inside child processes

	* thread_pthread.c (rb_thread_wakeup_timer_thread): check
	  ownership before incrementing
	  (rb_thread_wakeup_timer_thread_low): ditto
	  [Bug #13794] [ruby-core:83064]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 13:49:13 +00:00
usa
cce645e6a7 merge revision(s) 54803: [Backport #14321]
* configure.in (rb_cv_lgamma_r_pm0): check if lgamma_r(+0.0)
	  returns positive infinity, in addition to lgamma_r(-0.0).
	  AIX returns an incorrect result of negative infinity.

	* math.c (ruby_lgamma_r): handle +0.0, in addition to -0.0.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 13:47:33 +00:00
usa
3d6510c514 merge revision(s) 60071: [Backport #13953] [Backport #13954] [Backport #13955] [Backport #13957]
ext: check if null byte is contained

	[ruby-dev:50267] [Bug #13953]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 13:38:59 +00:00
usa
3f59416771 merge revision(s) 60066: [Backport #13952]
string.c: fix ASCII-only on succ

	* string.c (str_succ): clear coderange cache when no alpha-numeric
	  character case, carried part may become ASCII-only.
	  [ruby-core:83062] [Bug #13952]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 13:30:15 +00:00
usa
4e2989ee8f merge revision(s) 60059: [Backport #13949]
pack.c: unpack "M" may be ASCII only

	* pack.c (pack_unpack_internal): set ASCII only properly on "M",
	  may be ASCII only.  [ruby-core:83055] [Bug #13949]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 13:28:39 +00:00
usa
a852edd817 merge revision(s) 60060: [Backport #13950]
string.c: ASCII-incompatible is not ASCII only

	* string.c (tr_trans): ASCII-incompatible encoding strings cannot
	  be ASCII-only even if valid.  [ruby-core:83056] [Bug #13950]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 13:26:35 +00:00
usa
91e4978bb0 merge revision(s) 60024: [Backport #13945]
vm.c: fetch retval iff necessary

	* vm.c (rb_vm_make_jump_tag_but_local_jump): get rid of fetching
	  retval when it is not used.  it is necessary for local jump
	  state only.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 13:24:42 +00:00
usa
935319fbb8 merge revision(s) 60099,60100: [Backport #13964]
compile.c: fix stack consitency error

	* compile.c (iseq_compile_each0): fix stack consitency error on
	  attr-assign with safe navigation operator when the receiver is
	  nil, should pop it too.  [ruby-core:83078] [Bug #13964]

	test_call.rb: refine test_safe_call

	* test/ruby/test_call.rb (test_safe_call): rhs should not be
	  evaluated when the receiver is nil.  simplified the assertion
	  for  [Bug #13964].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 13:16:25 +00:00
usa
1aee5acdae merge revision(s) 59444,59445: [Backport #13776]
adjust indent [ci skip]

	* vm_insnhelper.c (vm_call_method_each_type): adjust indent of a
	  block in switch.

	visibility of inherited method

	* vm_insnhelper.c (vm_call_method_each_type): honor the original
	  visibility of inherited methods when a refinement is defined but
	  not activated.  [ruby-core:82209] [Bug #13776]

	Author:    Mon_Ouie (Mon ouie) <mon.ouie@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 13:13:36 +00:00
usa
ecb7182f93 merge revision(s) 60021: [Backport #13926]
HTTPHeader#add_field should allow binary [Bug #13926]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 11:47:49 +00:00
usa
66dfa32fe0 merge revision(s) 58410,58411: [Backport #13487]
ri.1: rewrite ri man page

	* man/ri.1: update the (very outdated) ri man page:
	  * update document date
	  * fix document title formatting and volume name
	  * update descriptions and options to current ri --help text
	  * fix some mdoc formatting errors (missing escaping of `\',
	    wrong macro for bullet list items)
	  * various rewordings and other improvements

	improve man pages

	* man/ruby.1, man/erb.1, man/goruby.1, man/irb.1:
	  fix document title formatting and volume name,
	  improve "REPORTING BUGS" section: fix mdoc formatting error
	  (wrong macro for bullet list items), small rewordings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 11:43:24 +00:00
usa
937457fee8 merge revision(s) 59372: [Backport #13649]
lib/net/imap.rb: Ignore trailing space for Microsoft Exchange Server

	Based on the patch by keysen (Jeremy Carlier).
	[ruby-core:81641] [Bug #13649]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 11:26:08 +00:00
usa
1f32210886 merge revision(s) 58208: [Backport #13386]
Add documents on Process::CLOCK_* constants

	* process.c: Add documents on Process::CLOCK_* constants.
	  Patch by Sunao Komuro <sunao-komuro@cookpad.com>.
	  Closes [GH-1567] [Bug #13386]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 11:24:19 +00:00
usa
5ec3e16712 merge revision(s) 58409: [Backport #10838]
ri.1: fix errors in ri man page

	* man/ri.1: fix some errors in ri man page (add missing options,
	  remove options that do not exist, fix formatter list).

	  Reported by Josh Cheek.  [ruby-core:68065] [Bug #10838]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 11:11:41 +00:00
usa
4238b67dd9 merge revision(s) 58020: [Backport #10936]
date_core.c: fix error in DateTime docs

	* ext/date/date_core.c: [DOC] fix format string for DateTime#rfc3339.
	  Reported by Andreas Rayo Kniep.  [ruby-core:68418] [Bug #10936]

	* ext/date/date_core.c: [DOC] ditto for DateTime#iso8601 and
	  DateTime#xmlschema; other small improvements.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 11:10:20 +00:00
usa
59475e5805 merge revision(s) 57887: [Backport #13159]
lib/ostruct.rb: [DOC] revise docs for OpenStruct

	* update paragraph on implementation:
	  define_singleton_method is used, not define_method
	* add call-seq with return values for each_pair
	* adopt description of dig from Array and Hash
	* fix description of the hash method
	* :nodoc: initialize_copy, respond_to_missing?
	* other small improvements, e.g. use the term `attribute' in the docs
	  (instead of `member'), which is clearer for users of the class
	* improve code examples: e.g. use more consistent style (always use
	  double quotes, drop `p' and `puts', ...), update inspect output,
	  use example data that is not prone to change (like population)
	* add more code examples
	* fix some small errors and grammar

	[ruby-core:79265] [Bug #13159]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 11:05:38 +00:00
usa
3535039980 merge revision(s) 57686: [Backport #13233]
rational.c: fix rdoc

	* rational.c: [DOC] fix wrong indentations and comment out some lines
	  in code examples to make them valid Ruby code and syntax highlighted
	  on the rendered page.

	[ci skip] [Bug #13233]
	Author: Marcus Stollsteimer sto.mar@web.de



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 11:03:46 +00:00
usa
305b200d10 merge revision(s) 57536: [Backport #13192]
doc: Add example for Symbol#to_s

	* string.c: add example for Symbol#to_s.

	The docs for Symbol#to_s only include an example for
	Symbol#id2name, but not for #to_s which is an alias;
	the docs should include examples for both methods.

	From: Marcus Stollsteimer <sto.mar@web.de>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 10:58:21 +00:00
usa
735496826b merge revision(s) 55265: [Backport #14182]
* lib/mkmf.rb (create_makefile): sort lists of source and object
	  files in generated Makefile, unless given by extconf.rb.
	  [Fix GH-1367]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 10:52:30 +00:00
usa
8dbc8caa0d * version.h: Bump version to 2.3.7
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@61264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-14 18:49:20 +00:00
usa
e1808b522b forgotten to update
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@61252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-14 14:56:02 +00:00
usa
1cfe43fd85 merge revision(s) 61242: [Backport #14185]
Fix a command injection vulnerability in Net::FTP.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@61248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-14 13:55:41 +00:00
usa
ccbe964c1f merge revision(s) 61197: [Backport #14184]
webrick: compile RE correctly for beginning and end match

	Using ^ and $ in regexps means we can accidentally get fooled
	by "%0a" in HTTP request paths being decoded to newline
	characters.  Use \A and \z to match beginning and end-of-string
	respectively, instead.

	Thanks to mame and hsbt for reporting.

	* lib/webrick/httpserver.rb (MountTable#compile):
	  use \A and \z instead of ^ and $
	* lib/webrick/httpserver.rb (MountTable#normalize): use \z instead of $
	* test/webrick/test_httpserver.rb (test_cntrl_in_path): new test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@61241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-14 13:36:50 +00:00
usa
1beda2970b merge revision(s) 60172,60189,60208,60210,60211: [Backport #14005]
webrick: do not hang acceptor on slow TLS connections

	OpenSSL::SSL::SSLSocket#accept may block indefinitely on clients
	which negotiate the TCP connection, but fail (or are slow) to
	negotiate the subsequent TLS handshake.  This prevents the
	multi-threaded WEBrick server from accepting other connections.

	Since the TLS handshake (via OpenSSL::SSL::SSLSocket#accept)
	consists of normal read/write traffic over TCP, handle it in the
	per-client thread, instead.

	Furthermore, using non-blocking accept() is useful for non-TLS
	sockets anyways because spurious wakeups are possible from
	select(2).

	* lib/webrick/server.rb (accept_client): use TCPServer#accept_nonblock
	  and remove OpenSSL::SSL::SSLSocket#accept call
	* lib/webrick/server.rb (start_thread): call OpenSSL::SSL::SSLSocket#accept
	* test/webrick/test_ssl_server.rb (test_slow_connect): new test
	  [ruby-core:83221] [Bug #14005]

	webrick: fix up r60172

	By making the socket non-blocking in r60172, TLS/SSL negotiation
	via the SSL_accept function must handle non-blocking sockets
	properly and retry on SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE.
	OpenSSL::SSL::SSLSocket#accept cannot do that properly with a
	non-blocking socket, so it must use non-blocking logic of
	OpenSSL::SSL::SSLSocket#accept_nonblock.

	Thanks to MSP-Greg (Greg L) for finding this.

	* lib/webrick/server.rb (start_thread): use SSL_accept properly
	  with non-blocking socket.
	  [Bug #14013] [Bug #14005]

	webrick: fix up r60172 and revert r60189

	Thanks to MSP-Greg (Greg L) for helping with this.

	* lib/webrick/server.rb (start_thread): ignore ECONNRESET, ECONNABORTED,
	  EPROTO, and EINVAL on TLS negotiation errors the same way they
	  were ignored before r60172 in the accept_client method of the
	  main acceptor thread.
	  [Bug #14013] [Bug #14005]

	webrick: fix up r60172 and r60208

	Thanks to MSP-Greg (Greg L) for helping with this.

	* lib/webrick/server.rb (start_thread): fix non-local return
	  introduced in r60208

	webrick: fix up r60172 and r60210

	Thanks to MSP-Greg (Greg L) for helping with this.

	* lib/webrick/server.rb (start_thread): properly fix non-local return
	  introduced in r60208 and r60210

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@61240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-14 13:33:54 +00:00