summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2018-09-21* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-21escape all env properly.ko1
* vm_backtrace.c (rb_debug_inspector_open): escape all env using `rb_vm_stack_to_heap()` before making bindings. [Bug #15105] There is a complicated story of this issue: Without this patch, IFUNC frame does not escaped. A IFUNC frame points to CFUNC ep as previous ep. However, CFUNC ep can be escaped because of making bindings of Ruby level frames. IFUNC's ep can points to invalidated ep and `rb_iter_break()` will fail. This is why `any?` fails. * test/-ext-/debug/test_debug.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-20Enumerable#to_h with block and so onnobu
[Feature #15143] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-20Add union method to Arraynobu
I introduce a `union` method equivalent to the `|` operator, but which accept more than array as argument. This improved readability, and it is also coherent with the `+` operator, which has a similar `concat` method. The method doesn't modify the original object and return a new object instead. It is plan to introduce a `union!` method as well. Tests and documentation are included. It solves partially https://bugs.ruby-lang.org/issues/14097 [Fix GH-1747] [Feature #14097] From: Ana María Martínez Gómez <ammartinez@suse.de> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-20parse.y: fix block passing with empty kwargsnobu
* parse.y (arg_blk_pass): preceeding arguments node may be NULL when an empty keyword argument hash splat is optimized away. [ruby-core:88890] [Bug #15087] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-19* hash.c (rb_hash_merge): Accepts zero or more hashes as argumentsmame
Hash#merge, merge!, and update could merge exactly two hashes. Now, they accepts zero or more hashes as arguments so that it can merge hashes more than two. This patch was created by Koki Ryu <liukoki@gmail.com> at Ruby Hack Challenge #5. Thank you! [ruby-core:88970] [Feature #15111] [Fix GH-1951] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-18Skip EHOSTUNREACH by host issuesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-18Merge upstream revision of rubygems/rubygems.hsbt
This commits includes tiny bugfix and new features listed here: * Add --re-sign flag to cert command by bronzdoc: https://github.com/rubygems/rubygems/pull/2391 * Download gems with threads. by indirect: https://github.com/rubygems/rubygems/pull/1898 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-18Tests of Enumerator::Yielder#yield with multiple argumentsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-16Propagate subprocess timeout scale option to worker processesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-16lib/matrix: Fix potential bug of Vector#angle_withmarcandre
Could happen for some linearly dependent vectors. Patch by Vasiliy Petrov. [Fix GH-1803] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-16Alias Struct#select as Struct#filter. Patch by Kenichi Kamiya.marcandre
[Fix GH-#1862] [#1784] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-15encoding.c: check external encodingnobu
* encoding.c (rb_enc_get_index): external encoding may not be Data object. [ruby-core:89016] [Bug #15122] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-15test_sprintf.rb: test for %pnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-13warn unused blocks with Enumerable#all? any? one? none?nobu
[Fix GH-1953] From: Koji Onishi <fursich0@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12fiber: fix crash on GC after forkingnormal
Remove the remainder of ROOT_FIBER_CONTEXT use and unnecessary differences between the root and non-root fiber. This makes it easier to follow new root fiber at fork time. Multiple sources of truth often leads to bugs, as in this case. We can determinte root fiber by checking a fiber against the root_fiber of its owner thread. The new `fiber_is_root_p' function supports that. Now, we can care only about free-ing/recycling/munmap-ing stacks as appropriate. [Bug #15050] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12enumerator.c: Fix ArithmeticSequence for complex stepmrkn
Make sure Enumerator::ArithmeticSequence#each to work well for a complex step value. This reverts commit ca47fb329a1d48af3e1009620bdb18e931c9f188. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12Revert "enumerator.c: Fix ArithmeticSequence for complex step"mrkn
This reverts commit 0a0f8238d02a2dfff4cd2892408e14cb826cec7e. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-12enumerator.c: Fix ArithmeticSequence for complex stepmrkn
Make sure Enumerator::ArithmeticSequence#each to work well for a complex step value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-11test_jit.rb: show extra debug info for #test_unload_unitsk0kubun
failure git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-11Use https instead of httpkazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-08Use `&.` after `&.`kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-08test/ruby/test_thread.rb: join threads in each testnormal
Leaky thread detection doesn't happen frequently, enough git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-07test/ruby/test_ast.rb: assert error messages toonobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-07Refactor testnobu
[Fix GH-1946] From: Josh Cheek <josh.cheek@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-05range.c: Range#cover? accepts Range object. [Feature #14473]tarui
* range.c (range_cover): add code for range argument. If the argument is a Range, check it is or is not covered by the reciver. If it can be treated as a sequence, this method treats it that way. * test/ruby/test_range.rb (class TestRange): add tests for this feature. This patch is written by Owen Stephens. thank you! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-05Merge csv-3.0.0 from ruby/csv repository.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-02Readline: expose rl_completion_quote_character variablenobu
[Feature #13050] From: georgebrock (George Brocklehurst) <ruby@georgebrock.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-01complex.c: simplify division resultnobu
* complex.c (f_divide): canonicalize rationals to simplify integer complex results. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-31test/lib/test/unit/assertions.rb: explicit delegation of keyword argumentsmame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-29test/ruby/test_io.rb (test_select_leak): use handle_interruptnormal
Interrupt timing is tricky and it's possible the target thread is still stopped from the previous loop iteration. [ruby-core:88732] [Bug #15043] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-29cont.c: set th->root_fiber to current fiber at forknormal
Otherwise, th->root_fiber can point to an invalid Fiber, because Fibers do not live across fork. So consider whatever Fiber is running the root fiber. [ruby-core:88723] [Bug #15041] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27Merge master branch from rubygems upstream.hsbt
* It's preparation to release RubyGems 3.0.0.beta2 and Ruby 2.6.0 preview 3. * https://github.com/rubygems/rubygems/compare/v3.0.0.beta1...fad2eb15a282b19dfcb4b48bc95b8b39ebb4511f git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27Merge rdoc-6.1.0.beta1.hsbt
* https://github.com/ruby/rdoc/compare/v6.0.4...v6.1.0.beta1 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27Merge psych-3.1.0.pre1.hsbt
* Update bundled libyaml-0.2.1 from 0.1.7. https://github.com/ruby/psych/pull/368 * Unify Psych's API: To use keyword arguments with method call. https://github.com/ruby/psych/pull/358 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-26test/ruby/test_io.rb (test_recycled_fd_close): Linux workaroundnormal
Arch Linux CI still seems to timeout on this test... Note, I can't reproduce the failures in these tests on a FreeBSD 11.1 VM while infinite-looping, even without the "th.join(0.001)". It doesn't seem related to the use of rb_wait_for_single_fd (r64529). cf. https://rubyci.org/logs/rubyci.s3.amazonaws.com/arch/ruby-trunk/log/20180826T090003Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25test/io/wait/test_io_wait_uncommon.rb: relax /dev/random checknormal
Too many machines lack entropy to have a usable /dev/random. I had similar problems on my system until I started using haveged(8), but we can't require that for CI. cf. https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-trunk/log/20180825T213003Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25thread_pthread.c: main thread always gets hit by signalsnormal
We need to ensure Signal.trap handlers can function if the main thread is sleeping after a subthread has grabbed sigwait_fd, but later exited. Consider the following timeline: main_thread sub-thread ----------------------------------------- Signal.trap() { ... } get sigwait_fd ppoll on sigwait_fd native_cond_sleep (via pthread_cond_wait) ppoll times-out put sigwait_fd sub-thread exits only thread alive SIGNAL HITS The problem is pthread_cond_wait cannot return EINTR, so we can never run the Signal.trap handler. So we will avoid using native_cond_sleep in the main thread and always use ppoll to sleep when in the main thread. This can guarantee the main thread remains aware of signals; even if it cannot safely read off sigwait_fd git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-24test/ruby/test_io.rb (test_recycled_fd_close): use IO#read to avoid ppoll callnormal
IO#sysread calls rb_wait_for_single_fd for compatibility, and perhaps something is amiss with that (unrelated to timer-thread elimination) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23test/readline/test_readline.rb: fix readline testk0kubun
for mingw. test/lib/minitest/unit.rb: Add 'guards' for mingw. Removed still-unused method `mswin?` from original patch. [Fix GH-1941] From: MSP-Greg <MSP-Greg@users.noreply.github.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23check trace flags at loading [Bug #14702]ko1
* iseq.c (iseq_init_trace): at ISeq loading time, we need to check `ruby_vm_event_enabled_flags` to turn on trace instructions. Seprate this checking code from `finish_iseq_build()` and make new function. `iseq_ibf_load()` calls this funcation after loading. * test/ruby/test_iseq.rb: add a test for this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22compile.c: remove tracecoverage instruction for line coveragemame
Line coverage was based on special instruction "tracecoverage". Now, instead, it uses the mechanism of trace hook [Feature #14104]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22parse.y: remove coverage-related code fragmentsmame
The code fragments that initializes coverage data were scattered into both parse.y and compile.c. parse.y allocated a coverage data, and compile.c initialize the data. To remove this cross-cutting concern, this change moves the allocation from "coverage" function of parse.y to "rb_iseq_new_top" of iseq.c. For the sake, parse.y just counts the line number of the original source code, and the number is passed via rb_ast_body_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21Add more assertions for NotImplementedError of instance methodkazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-20test/socket/test_socket.rb (timestamp_retry_rw): IO.select before recvmsgnormal
CI failures are still happening from these tests, but try to break out of it earlier instead of holding up the job. [Bug #14898] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-19test/ruby/test_io.rb (test_select_leak): quiet unused variable warningnormal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18Suppress read of ~/.irbrckazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-18test/ruby/test_system.rb: suppress prompt and echo on Windowsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e