Age | Commit message (Collapse) | Author |
|
may fix the test failure on some platforms introduced at r58108.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
envutil.rb: timeout_error argument to invoke_ruby
* test/lib/envutil.rb (invoke_ruby): add `timeout_error` optional
keyword argument, the exception class to be raised if the target
process timed out. if it is nil, no exception will be raised at
timeout but the terminated output, error, and status will be
returned. defaulted to Timeout::Error.
* test/lib/envutil.rb (assert_separately): check outputs and
status (including diagnostic reports) of timed-out process.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
vm_method.c: resolve refined method to undef
* vm_method.c (rb_undef): resolve the method entry which refines a
prepended method entry. [ruby-core:78944] [Bug #13096]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
fileutils.rb: do not make root
* lib/fileutils.rb (FileUtils#mkdir_p): no need to make root
directory which should be exist and cannot be made with mkdir
recent Cygwin can make a directory contains a colon.
[Bug #13214]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
rational.c: infinity in power
* rational.c (nurat_expt): return Infinity due to overflow.
[ruby-core:79686] [Bug #13242]:
rational.c: infinity in power
* rational.c (nurat_expt): return 0 due to overflow.
[ruby-core:79686] [Bug #13242]:
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
vm.c: check type of hash to merge
* vm.c (core_hash_merge): check the type of the target hash to
merge. [ruby-core:78536] [Bug #13015]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
use TRUE/FALSE.
define rb_thread_sleep_deadly_allow_spurious_wakeup().
* thread.c, thread_sync.c: define new function
rb_thread_sleep_deadly_allow_spurious_wakeup() and use it instead of
using sleep_forever() directly.
allow Queue operation in trap.
* thread_sync.c: allow spurious wakeup to check Queue status just after trap.
[Bug #12405]
* test/thread/test_queue.rb: add a test for it.
test_queue.rb: fix portability
* test/thread/test_queue.rb (test_queue_with_trap): fix
portability. use SIGINT instead of SIGUSR2 which is supported
on not all platforms.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58115 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_2@58111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
check thread deadness correctly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58108 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_2@58107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
fix UTF-32 valid_encoding?
* enc/utf_32be.c (utf32be_mbc_enc_len): check arguments precisely.
[ruby-core:79966] [Bug #13292]
* enc/utf_32le.c (utf32le_mbc_enc_len): ditto.
* regenc.h (UNICODE_VALID_CODEPOINT_P): predicate for valid
Unicode codepoints.
fix UTF-32 valid_encoding?
* test/ruby/test_io_m17n.rb (TestIO_M17N#test_puts_widechar): do
not use invalid codepoint. [ruby-core:79966] [Bug #13292]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
lib/ostruct.rb: Fix returned value of each_pair.
From a patch by Marcus Stollsteimer. [Fixes #13169]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
fix optimization for hash aset/aref with fstring
Patch by Eric Wong [ruby-core:78797].
I don't like the idea of making insns.def any bigger to support
a corner case, and "test_hash_aref_fstring_identity" shows
how contrived this is.
[ruby-core:78783] [Bug #12855]
adjust indent [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
string.c: rindex(//) should set $~.
This seems a bug introduced by r520 (1.4.0). [ruby-core:79110] [Bug #13135]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
parallel.rb: fix intervention
* test/lib/test/unit/parallel.rb (_report): send a response and a
newline atomically, to get rid of intervention with "p" which
runs in a separate thread.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
io.c: close before wait
* io.c (io_close_fptr): notify then close, and wait for other
threads before free fptr. [ruby-core:79262] [Bug #13158]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
io.c: fix race between read and close
* io.c (io_fillbuf): fix race between read and close, in the case
the IO gets closed before the reading thread achieve the lock.
[ruby-core:78845] [Bug #13076]
thread.c: fix race between read and close
* thread.c (rb_thread_fd_close): wait until all threads using the
fd finish the operation, not to free the buffer in use.
[ruby-core:78845] [Bug #13076]
revert a part of r57199
* io.c (io_fillbuf): revert a part of r57199 because it broke IO#getch.
see also [Bug #13076]
io.c: fix race between read and close
* io.c (io_fillbuf): fix race between read and close and bail out
in the case the IO gets closed before the reading thread achieve
the lock. [ruby-core:78845] [Bug #13076]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
class.c: non-keyword hash class
* class.c (rb_extract_keywords): keep the class of non-keyword
elements hash as the original. [ruby-core:77813] [Bug #12884]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
string.c: block for scrub with ASCII-incompatible
* string.c (rb_enc_str_scrub): honor the given block with
ASCII-incompatible encoding. [ruby-core:79039] [Bug #13120]
string.c: yield invalid part
* string.c (rb_enc_str_scrub): yield the invalid part only with
ASCII-incompatible. [ruby-core:79039] [Bug #13120]
string.c: replacement and block
* string.c (rb_enc_str_scrub): only one of replacement and block
is allowed. [ruby-core:79038] [Bug #13119]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
compile.c: check err_info
* compile.c (iseq_setup): bail out if any errors found.
[ruby-core:76531] [Bug #12613]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
rational.c: memory leak in gcd
* rational.c (rb_gcd_gmp): fix memory leak. patched by KISHIMOTO,
Makoto <ksmakoto AT dd.iij4u.or.jp> in [ruby-dev:49934].
[Bug #13089]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
pack.c: avoid returning uninitialized String
Fix unpacking with 'b', 'B', 'h' and 'H' format. Do not return an
uninitialized String to Ruby before filling the content bytes.
Fixes r11175 ("pack.c (pack_unpack): execute block if given with
unpacked value instead of creating an array", 2006-10-15).
[ruby-core:78841] [Bug #13075]
test/ruby/test_pack.rb: fix test case added by r57187
The test case for String#unpack added by r57187 is not properly testing
because the String will be filled after the block invocation.
[ruby-core:78841] [Bug #13075]
Thanks to nagachika for pointing this out:
http://d.hatena.ne.jp/nagachika/20161226/ruby_trunk_changes_57184_57194#r57187
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* lib/forwardable.rb (def_instance_delegator): adjust backtrace of
method body by tail call optimization. adjusting the delegated
target is still done by deleting backtrace.
* lib/forwardable.rb (def_single_delegator): ditto.
* lib/forwardable.rb (Forwardable._delegator_method): extract
method generator and deal with non-module objects.
[ruby-dev:49656] [Bug #12478]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
eval.c: fix circular cause
* eval.c (exc_setup_cause): always set cause of cause to get rid
of circular references. [ruby-core:78688] [Bug #13043]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
test_fileutils.rb: Use primary group too
* test/fileutils/test_fileutils.rb (TestFileUtils#setup): Use
primary group as well as supplementary groups. based on the
patch by Vit Ondruch at [ruby-core:78053]. [Bug #12910]
It might happen in certain environments (systemd-nspawn) that
process has no supplementary groups, but primary groups should be
enough to pass most of the tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
eval.c: fix circular cause
* eval.c (exc_setup_cause): always set cause of cause to get rid
of circular references. [ruby-core:78688] [Bug #13043]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
re.c: consider the case of RMatch::regexp is nil
Follow r49675, r57098 and r57110. Don't assume RMatch::regexp always
contains a valid Regexp instance; it will be Qnil if the MatchData is
created by rb_backref_set_string(). [ruby-core:78741] [Bug #13054]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
array.c: check array length every time after yielding
Since the Array may be modified during rb_yield(), the length before
invoking the block can't be trusted. Fix possible out-of-bounds read in
Array#combination and Array#repeated_combination.
It may better to make a defensive copy of the Array, but for now let's
follow what Array#permutation does. [ruby-core:78738] [Bug #13052]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
sprintf.c: fix width underflow
* sprintf.c (rb_str_format): fix memory corruption by width
underflow. https://github.com/mruby/mruby/issues/3347
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
re.c: non-regexp name reference
* re.c (rb_reg_regsub): other than regexp has no name references.
[ruby-core:78686] [Bug #13042]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
encoding.c: handle needmore error from rb_enc_precise_mbclen()
rb_enc_ascget() erroneously reports success even if the given byte
sequence is incomplete, for non-ASCII compatible encoding strings.
rb_enc_precise_mbclen() may return a negative value on error, and thus
rb_enc_ascget() must not store the return value in 'unsigned int';
otherwise the subsequent MBCLEN_CHARFOUND_P() check won't catch the
error. [ruby-core:78646] [Bug #13034]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
extension.rdoc: fix rb_get_kwargs [ci skip]
* doc/extension.rdoc: [DOC] optional keyword arguments are
defaulted to Qundef. ignored keys are kept in the hash but a
new Hash is not created. [ruby-dev:49893] [Bug #13004]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
marshal.c: fix infinite recursion
* marshal.c (check_userdump_arg): marshal_dump should not return
an instance of the same class, otherwise it causes infinite
recursion. [ruby-core:78289] [Bug #12974]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* compile.c (setup_args): duplicate splatting array if more
arguments present to obey left-to-right execution order.
[ruby-core:77701] [Bug# 12860]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* test/misc/test_ruby_mode.rb (assert_indent): since write-region
in Emacs 25.1 no longer displays the "Wrote file" message, shows
the explicit message to check if successfully finished.
[ruby-core:77355] [Bug #12785]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* test/ruby/test_file.rb (TestFile#test_stat): fix noatime case.
[ruby-core:77943] [Bug #12903]
* ext/-test/file/fs.c (get_atime_p): Updating of file access times
is enabled or not.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* test/rinda/test_rinda.rb (test_make_socket_ipv6_multicast,
test_make_socket_ipv6_multicast_hops): skip if IPv6 multicast
address is not available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* lib/net/http.rb (transport_request): other than HTTPContinue
in 1xx (HTTPInformation) also needs to continue. [Bug #12890]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
error.c: rb_get_backtrace
* error.c (rb_get_backtrace): move from eval_error.c to call
exc_backtrace directly. [ruby-core:78097] [Bug #12925]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* proc.c (mnew_internal): follow the original class, not to loop
the prepended module. [ruby-core:77591] [Bug #12832]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
test_process.rb: fix pgroup test
* test/ruby/test_process.rb (TestProcess#test_execopts_pgroup):
use dynamically assigned pid for the process group, instead of a
magic number 2. [ruby-core:78051] [Bug #12909]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* sprintf.c (rb_str_format): format exact number more exactly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* thread.c (rb_thread_pending_interrupt_p): no pending interrupt
before initialization.
* thread.c (thread_raise_m, rb_thread_kill): uninitialized thread
cannot interrupt. [ruby-core:72732] [Bug #11959]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* eval_intern.h (TH_PUSH_TAG): Initialize struct rb_vm_tag::tag with
Qundef rather than 0 which is equal to Qfalse. Since Kernel#throw(obj)
searches a tag with rb_vm_tag::tag == obj, throw(false) can
accidentally find an unrelated tag which is not created by
Kernel#catch. [ruby-core:77229] [Bug #12743]
* test/ruby/test_exception.rb (test_throw_false): Add a test case for
this.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* lib/logger.rb (Logger::Period#next_rotate_time): fix monthly log
rotate when DST is applied during a month of 31 days.
[Fix GH-1458]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* variable.c (rb_const_search): raise with the actual class/module
name which defines the private constant.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* lib/uri/generic.rb (def check_password): don't include bad password
in URI exception output
* test/uri/test_generic.rb (def test_set_component): test for behavior
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* array.c (flatten): use rb_obj_class instead of rb_class_of
because rb_class_of may return a singleton class.
[ruby-dev:49781] [Bug #12738]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|