Age | Commit message (Collapse) | Author |
|
a64: fix crash on register stack mark/sweep pass
* thread_pthread.c: move 'register_stack_start' earlier.
[ruby-core:79928] [Bug #13284] [Fix GH-1625]
Author: Sergei Trofimovich <slyfox@gentoo.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* lib/net/smtp.rb (tlsconnect): support timeout for TLS handshake.
[ruby-core:76893] [Bug #12678]
* lib/net/protocol.rb (ssl_socket_connect): new method to implement
timeout for TLS handshake.
* lib/net/http.rb (connect): use Net::Protocol#ssl_socket_connect.
* test/net/smtp/test_smtp.rb (test_tls_connect, test_tls_connect):
use Socket.tcp_server_sockets in case localhost is resolved to ::1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
which fixes a real bug.
* thread.c (struct waiting_fd): declare
(rb_thread_io_blocking_region): use on-stack list waiter
(rb_notify_fd_close): walk vm->waiting_fds instead
(call_without_gvl): remove old field setting
(th_init): ditto
[Feature #9632]
* vm_core.h (typedef struct rb_vm_struct): add waiting_fds list
* (typedef struct rb_thread_struct): remove waiting_fd field
(rb_vm_living_threads_init): initialize waiting_fds list
This should fix bad interactions with test_race_gets_and_close
in test/ruby/test_io.rb since we ensure rb_notify_fd_close
continues returning the busy flag after enqueuing the interrupt.
* thread.c (rb_notify_fd_close): do not enqueue multiple interrupts
[ruby-core:81581] [Bug #13632]
* test/ruby/test_io.rb (test_single_exception_on_close):
new test based on script from Nikolay
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
from Cipher#initialize. This is effectively a revert of r32723
("Avoid possible SEGV from AES encryption/decryption", 2011-07-28).
the patch is derived from https://github.com/ruby/openssl/commit/8108e0a6db133f3375608303fdd2083eb5115062,
written by Kazuki Yamaguchi.
[Backport #8221]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* ext/psych/psych.gemspec: bump version to 2.1.0.1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
parse.y: check multibyte char
* parse.y (parser_precise_mbclen): check invalid multibyte char at
skipping strings following `?x` literal string, not to stuck in
a infinite loop. [ruby-core:81746] [Bug #13672]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
pathname.rb: UNC root pathname needs a separator
* ext/pathname/lib/pathname.rb (Pathname#plus): UNC root pathname
needs a separator. File.basename returns "/" on UNC root, as
well as sole drive letter, even if it does not end with a
separator. [ruby-core:80900] [Bug #13515]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
rexml: add close tag check on end of document to StreamParser
[ruby-core:81593] [Bug #13636]
Reported by Anton Sivakov. Thanks!!!
* properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
array.c: check position to insert
* array.c (rb_ary_insert): check position to insert even if no
elements to be inserted. [ruby-core:81125] [Bug #13558]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
date_core.c: fix docs for %Z format
* ext/date/date_core.c: [DOC] fix documentation for %Z format
of {Date,DateTime}.strftime.
Reported by Damon Timm. Based on a patch by nano.
[ruby-core:79602] [Bug #13231] [Fix GH-1565]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
rss: Accept empty text element as valid element
Parser has been accepted it but XML serializer wasn't accepted.
Reported by stefano frabetti. Thanks!!!
[ruby-core:80965] [Bug #13531]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
X509_LOOKUP_load_file()
X509_LOOKUP_load_file(), which ends up calling
X509_load_cert_crl_file()
internally, may leave error entries in the queue even when it returns
non-zero value (which indicates success).
This will be fixed by OpenSSL 1.1.1, but can be worked around by
clearing the error queue ourselves.
Fixes: [Backport #11033]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* gc.c (heap_page_resurrect): do not return tomb_pages when
page->freelist == NULL.
[Bug #12670]
test for [Bug #12670]
heap corruption by deferred free.
gc.c: expand sorted pages
* gc.c (heap_page_allocate): expand sorted pages before inserting
allocated new page. [Bug #12670]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
vsnprintf.c: prefix with precision
* vsnprintf.c (BSD_vfprintf): sign and hex-prefix should not be
counted in precision. [ruby-dev:47714] [Bug #8916]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
thread.c: disable VM events when stack overflow
* thread.c (ruby_thread_stack_overflow): disable VM events when
stack overflow occurred; it causes another stack overflow again
in making backtrace object, and crashes.
[ruby-core:80662] [Bug #13425]
increase timeout seconds.
* test/ruby/test_trace.rb (test_trace_stackoverflow): on some platforms
this test fails because of timeout.
disable rewind hooks.
* vm.c (hook_before_rewind): skip rewind hooks if err is SystemStackError
because rewind hooks can cause stack overflow again and again.
* thread.c (ruby_thread_stack_overflow): do not disable all hooks.
Additionally, clearing ruby_vm_event_flags is not suitable way
to disable hooks.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
proc.c: skip prepended modules
* proc.c (method_super_method): skip prepended modules and
continue from the super class of the original class.
[ruby-core:81666] [Bug #13656]
test/ruby/test_method.rb: refined [ruby-core:81666] [Bug #13656]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* lib/net/smtp.rb (getok, get_response): raise an ArgumentError when
CR or LF is included in a line, because they are not allowed in
RFC5321.
RFC5321. Thanks, Jeremy Daer.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
thread.c: avoid busy looping on rb_thread_fd_close
We no longer use it this function, but extensions do, and
we need to ensure it continues to work for them.
* thread.c (rb_thread_fd_close): schedule other threads in loop
* ext/-test-/thread_fd_close/thread_fd_close.c: new file
* ext/-test-/thread_fd_close/depend: ditto
* ext/-test-/thread_fd_close/extconf.rb: ditto
* test/-ext-/thread_fd_close/test_thread_fd_close.rb: new test
* properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
sample/pty/shl.rb: update sample
* Specify frozen_string_literal: true.
* Fix TypeError of raise.
* Use a character literal instead of Integer.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
string.c: docs for String#split
* string.c: [DOC] clarify docs for String#split when called
with limit and capture groups.
Reported by Cichol Tsai. [ruby-core:81505] [Bug #13621]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
erb.rb: Allow explicit trimming carriage return
when trim_mode is "-", for Windows environments.
[ruby-core:39625] [Bug #5339]
erb.rb: Allow trimming CR in all trim_modes
to unify a behavior with r58823 and r58825.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
erb.rb: Allow trimming carriage return
when trim_mode is "<>", for Windows environments.
[Bug #11464]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
Merge latest dtoa.c [Bug #13545]
Apply some part of http://www.netlib.org/fp/dtoa.c with my eyes...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
dir.c: getattrlist on OSX 10.5
* dir.c (is_case_sensitive): use getattrlist() if fgetattrlist()
is unavailable, on OSX 10.5. [ruby-core:68829] [Bug #11054]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* tool/mkconfig.rb (RbConfig): prefix SDKROOT to oldincludedir
not includedir, the latter is outside the ruby installation.
[ruby-core:72496] [Bug #11881]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
autoload: always wait on loading thread
We cannot assume autoload_provided/rb_feature_provided returning
TRUE means it is safe to proceed without waiting. Another
thread may call rb_provide_feature before setting the constant
(via autoload_const_set). So we must wait until autoload is
completed by another thread.
Note: this patch was tested with an explicit rb_thread_schedule
in rb_provide_feature to make the race condition more apparent
as suggested by <s.wanabe@gmail.com>:
> --- a/load.c
> +++ b/load.c
> @@ -563,6 +563,7 @@ rb_provide_feature(VALUE feature)
> rb_str_freeze(feature);
>
> rb_ary_push(features, rb_fstring(feature));
> +rb_thread_schedule();
> features_index_add(feature, INT2FIX(RARRAY_LEN(features)-1));
> reset_loaded_features_snapshot();
> }
* variable.c (check_autoload_required): do not assume a provided
feature means autoload is complete, always wait if autoload is
being performed by another thread.
[ruby-core:81105] [Bug #11384] Thanks to <s.wanabe@gmail.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
process.c: temporary string for buffer
* process.c (obj2uid, obj2gid): use temporary string as the buffer
instead of `rb_alloc_tmp_buffer`, which is `NODE_ALLOCA` since
r51492. [ruby-core:81084] [Bug #13554]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
variable.c: cleanup waitq upon thread death
* variable.c (autoload_reset): use idempotent list_del_init
(autoload_sleep): moved code from rb_autoload_load
(autoload_sleep_done): cleanup for use with rb_ensure
(rb_autoload_load): ensure list delete happens in case the
thread dies during sleep
* test/ruby/bug-13526.rb: new script for separate execution
* test/ruby/test_autoload.rb (test_bug_13526): new test
[ruby-core:81016] [Bug #13526]
* properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
Fix space flag when Inf/NaN and width==3
* sprintf.c (rb_str_format): while `"% 2f"` and `"% 4f"` result in
`" Inf"` and `" Inf"` respectively, `"% 3f"` results in
`"Inf"` (no space).
Refactor "%f" % Inf/NaN
* sprintf.c (rb_str_format): as for non-finite float, calculate
the exact needed size with the space flag.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
thread_win32.c: no GVL for interrupt_event
* thread_win32.c (w32_wait_events): do not acquire GVL, to fix
deadlock at read/close race condition. instead, just ignore
interrupt_event if it is closed.
thread_win32.c: fix index
* thread_win32.c (w32_wait_events): fix wait object index in the
case of interrupt_event is not usable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
nogvl_wait_for_single_fd must wait as its name
poll(fds, n, 0) mean no timeout and immediately return. If you want to
wait something, you need to use -1 instead.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* class.c (Init_class_hierarchy): prevent rb_cObject which is the
class tree root, from GC. [ruby-dev:49666] [Bug #12492]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
ripper/lexer.rb: nested indented heredoc
* ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): fix for
nested indedented here documents, where `Elem`s are nested too.
[ruby-core:80977] [Bug #13536]
ripper/lexer.rb: nested indented heredoc
* ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): insert
stripped leading spaces as `on_ignored_sp` elements, so that the
original source can be reconsructed.
[ruby-core:80977] [Bug #13536]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
because in this version `u2.id` is not used for this purpose.
fixed failure of ruby/spec introduced at r58518.
see also [Backport #13363]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
class.c: ensure_includable
* class.c (ensure_includable): extract checks to include and
prepend.
class.c: prohibit refinement module
* class.c (ensure_includable): cannot include refinement
module, or the type and the class do not match.
[ruby-core:79632] [Bug #13236]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
keep line number after unterminated string literal
* parse.y (parser_parse_string): keep line number even after an
unterminated string literal. it does not matter in the parser,
ripper needs this value after this error.
parse.y: unterminated content token
* parse.y (parser_parse_string): defer the end token to next
reading, to yield tSTRING_CONTENT with the unterminated content.
[Bug #13363]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
io.c: [DOC] expand docs for IO#puts
[ruby-core:80081] [Bug #13306]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
pty/shl.rb: update [ci skip]
* sample/pty/shl.rb: stop writer loop when the child exited.
PTY::ChildExited no longer raises asynchronously since r20298.
[ruby-dev:49974] [Bug #13191]
pty/shl.rb: update [ci skip]
* sample/pty/shl.rb: use io/console instead of stty.
[ruby-dev:49974] [Bug #13191]
pty/shl.rb: update [ci skip]
* sample/pty/shl.rb: do not manage array length separately.
[ruby-dev:49974] [Bug #13191]
pty/shl.rb: update [ci skip]
* sample/pty/shl.rb: leap exited child process.
[ruby-dev:49974] [Bug #13191]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
configure.in: use AC_SEARCH_LIBS
* configure.in (--with-gmp, --with-jemalloc): use AC_SEARCH_LIBS
to check if no library is required, instead of AC_CHECK_LIB.
[ruby-core:79368] [Bug #13175]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* numeric.c (flo_round): [EXPERIMENTAL] adjust the case that the
receiver is close to the exact but unrepresentable middle value
of two values in the given precision.
http://d.hatena.ne.jp/hnw/20160702
numeric.c: round as double
* numeric.c (flo_round): compare as double, not long double with
i387.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
thread.c: rb_thread_fd_close [ci skip]
* thread.c (rb_thread_fd_close): re-define only for abi-check,
abort if called. [ruby-core:80078] [Bug #13304]
thread.c: rb_thread_fd_close no longer returns
thread.c: rb_thread_fd_close [ci skip]
* thread.c (rb_thread_fd_close): remove deprecated. a couple of
external libraries used it. [ruby-core:80078] [Bug #13304]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
The patch was provided by usa. [ruby-core:80484] [Bug #13376]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* hash.c (any_hash): fix Symbol#hash to be nondeterministic.
The patch was provided by Eric Wong. [ruby-core:80433] [Bug #13376]
test/ruby/test_symbol.rb: new test for nondeterminism
We need to ensure hashes for static symbols remain
non-deterministic to avoid DoS attacks. This is currently the
case since 2.4+, but was not for the 2.3 series.
* test/ruby/test_symbol.rb (test_hash_nondeterministic): new test
[ruby-core:80430] [Bug #13376]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* win32/win32.c (poll_child_status): rb_w32_wait_events_blocking() sets
errno internally, then should not set it here.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* eval.c, method.h, proc.c, vm.c, vm_eval.c, vm_insnhelper.c, vm_method.c:
TracePoint#method_id should return method_id, not callee_id.
[ruby-core:77241] [Feature #12747]
* test/ruby/test_settracefunc.rb: change accordingly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* lib/uri/mailto.rb: Removed needless `return` and use `.`` instead of `::`
with class method.
* test/uri/test_mailto.rb: Added tests for coverage.
Use URI.decode_www_form_component [Bug #10774]
`parser` refered RFC2396_Parser, but it is separated.
test is contributed by Dominik Menke
test_mailto.rb: adjust scope
test_mailto.rb: overwritten methods
* test/uri/test_mailto.rb (URI::TestMailTo#test_to_mailtext):
merge overwritten methods. [Bug #10774]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* ruby.c (process_options): convert -e script to the encoding
given by a command line option on Windows. assume it is the
expected encoding. [ruby-dev:49461] [Bug #11900]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* thread.c (rb_threadptr_raise): set cause from the called thread,
but not from the thread to be interrupted.
[ruby-core:77222] [Bug #12741]
* test/ruby/test_exception.rb: fix thread issues.
* use Queue instead of a local variable for synchronization.
* join created thread to soleve leaking threads warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
It breaked CI on vc12-x64
http://13.78.52.201/vc12-x64/ruby-2.3/log/20170207T182419Z.log.html.gz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@57626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|