Граф коммитов

53710 Коммитов

Автор SHA1 Сообщение Дата
normal db68ccc20d test/ruby/test_thread.rb (test_fork_while_parent_locked): reduce threads
Reduce thread counts unconditionally for some CI systems with
low limits..  And Solaris apparently lacks RLIMIT_NPROC, so we
can't detect resource limits and scale the test appropriately.

[ruby-core:90670] [Bug #15430]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-22 08:08:03 +00:00
nobu 1849288722 Fix for circular causes
* eval_error.c (show_cause): get rid of infinite recursion on
  circular causes.  [Bug #15447]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-22 07:14:14 +00:00
nobu 65dced4320 Removed garbage output
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-22 07:14:13 +00:00
nobu 17b6be1ddc Moved regexps not to confuse ruby-mode.el
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-22 07:14:12 +00:00
k0kubun 17ca870a4d benchmark/app_erb.yml: remove unused variable
3efcb74036 (r31762996)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-22 01:43:45 +00:00
normal 0fd53f519f thread_sync.c (rb_mutex_t): eliminate fork_gen
The true bug fork_gen was hiding was rb_mutex_abandon_locking_mutex
failing to unconditionally clear the waitq of mutexes it was
waiting on.  So we fix rb_mutex_abandon_locking_mutex, instead,
and eliminate rb_mutex_cleanup_keeping_mutexes.

This commit was tested heavily on a single-core Pentium-M which
was my most reliable reproducer of the "crash.rb" script from
[Bug #15383]

[Bug #14578] [Bug #15383]

Note: [Bug #15430] turned out to be an entirely different
problem: RLIMIT_NPROC limit was hit on the CI VMs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-22 01:41:18 +00:00
normal 5072f03741 test/ruby/test_thread.rb: reduce thread count to avoid SIGKILL
Perhaps this error report is down to resource limits on a VM:

http://rubyci.s3.amazonaws.com/centos7/ruby-trunk/log/20181221T230003Z.fail.html.gz

But rb_mutex_t.fork_gen is still redundant, I think.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-21 23:32:36 +00:00
normal 6f91160fa9 test/ruby/test_thread.rb: add diagnosis code for [Bug #15430]
I can't find stderr in the test-all output of the CI machine,
so maybe the assertion will show what's going on.

http://rubyci.s3.amazonaws.com/centos7/ruby-trunk/log/20181221T170003Z.log.html.gz#test-all

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-21 21:44:09 +00:00
k0kubun a934b66437 .travis.yml: use -v for osx to find a blocking test
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-21 16:36:37 +00:00
k0kubun c1b8965410 ../arith_seq/../extract.c: remove unused variable
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-21 16:19:31 +00:00
k0kubun 4e42ebf018 .travis.yml: give up parallel build for osx
Even building ruby seems to hang for unknown reasons.
https://travis-ci.org/ruby/ruby/jobs/471021727

Travis's osx environment is too fragile. Avoid anything dangerous.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-21 16:07:41 +00:00
svn 3a2c6a86e5 * 2018-12-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-21 15:07:19 +00:00
k0kubun 8af3bd4594 .travis.yml: avoid using -j3 for osx
osx build has failed too often. we don't know why.

To know which test hangs forever, we might want to have hard timeout for
all test case (like 9min, slightly less than no-output timeout) in test-all.
But it's a little hard to implement and I would workaround an unknown
cause somehow.

It's known that -j is harmful for some tests in test-all. Let's try to
remove it first, and if it doesn't work, I'll resurrect -v option to
easily know which test is the culprit.

Slow correctness is much better than fast false-positive.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-21 15:07:18 +00:00
svn 982bbc1130 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-21 14:33:26 +00:00
k0kubun cbfaf44001 test/excludes/_wercker: give up testing TestGemRemoteFetcher
The tests are really fragile with --jit-wait and it doesn't have interface
to modify this timeout at all.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-21 14:33:25 +00:00
k0kubun 6bbd46a072 test_jit.rb: show debug info for success_count test
to investigate
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20181221T092505Z.fail.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-21 14:01:49 +00:00
mrkn 7bef465e9b range.c: reject ArithmeticSequence in rb_range_values
Reject ArithmeticSequence in rb_range_values so that methods like
Array#[] raises TypeError for ArithmeticSequence as an index.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-21 13:05:16 +00:00
normal fa5601e7b9 thread_sync.c (rb_mutex_cleanup_keeping_mutexes): update fork_gen
... when clearing waitq. Otherwise, we risk redundantly clearing
valid waiters in future calls to `mutex_ptr`.

Note: I am not sure if this fixes [Bug #15430], and even if it
did, fork_gen is a belt-and-suspenders redundancy for [Bug #15383]
which wastes one word for every Mutex object.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-21 12:32:52 +00:00
normal 2a742d5f9b thread_sync.c (rb_mutex_abandon_keeping_mutexes): remove unnecessary check
rb_mutex_abandon_all functions fine when passed a NULL value,
so let the compiler deal with the complexity of the branch
instead of the person reading the code.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-21 12:32:48 +00:00
mame 010a742cb6 eval_error.c (show_cause): check if cause is an Exception or not
Fixes [Bug #15447]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-21 11:44:21 +00:00
mrkn 09b3d38c72 enumerator.c: Fix airth_seq_each for Rational
Fix the wrong uses of rb_int_ge in arith_seq_each.

[ruby-core:90648] [Bug #15444]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-21 00:03:39 +00:00
mrkn ccdba542d3 Import bigdecimal-1.4.0.pre.20181220a
* https://github.com/ruby/bigdecimal/compare/v1.4.0.pre.20181214a..v1.4.0.pre.20181220a

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-20 23:29:49 +00:00
nobu feb78840c8 iseq.c: resurrect literal hash operands
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-20 23:21:50 +00:00
stomar 97587ed4e9 NEWS: small improvements
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-20 22:54:36 +00:00
svn b430aa3a09 * 2018-12-21
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-20 21:17:15 +00:00
nobu 75584ceb56 A couple of small English fixes [ci skip]
[Fix GH-2052]

From: Jon Burgess <jkburges@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-20 21:17:11 +00:00
mame ab2da43ce4 ext/coverage/lib/coverage.rb (Coverage.line_stub): use only line events
It wrongly used all linenos of ISeq#trace_points which includes not only
line events but also call, return, and other events.  So, the result
included some linenos that can not be covered at all by line coverage.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-20 10:17:37 +00:00
kazu 1d13610d8a [DOC] Update CI build status badges [ci skip]
copy from README.md

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-20 09:55:05 +00:00
ko1 2a70f68c05 hide iseq operand object for duphash. [Bug #15440]
* compile.c (compile_array): hide source Hash object.

* hash.c (rb_hash_resurrect): introduced to dup Hash object
  using rb_cHash.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-20 07:17:55 +00:00
nobu fe8475d7df Test separately to get rid of risk to modify unrelated hash
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-20 06:59:27 +00:00
nobu ec7b1e475b Freeze hash literals embedded in duphash instructions
Previously, these hash literals were not frozen, and thus could be
modified by ObjectSpace, resulting in undesired behavior.  Example:

```ruby
require 'objspace'

def a(b={0=>1,1=>4,2=>17})
  b
end

p a
ObjectSpace.each_object(Hash) do |a|
  a[3] = 8 if a.class == Hash && a[0] == 1 && a[1] == 4 && a[2] == 17
end
p a
```

It may be desirable to hide such hashes from ObjectSpace, since
they are internal, but I'm not sure how to do that.

From: Jeremy Evans <code@jeremyevans.net>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-20 06:44:50 +00:00
nobu f89238ec0d parse.y: ignore constant name captures
* parse.y (reg_named_capture_assign_iter): ignore non-local name
  captures, including non-ASCII constant names.
  [ruby-dev:50719] [Bug #15437]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-20 05:43:15 +00:00
kou 766f9b4aff Really ensure loading REXML in tests
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-20 04:03:10 +00:00
nobu 5a846eb657 rbinstall.rb: purge %x[git ls-files] too
[Bug #13423]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-20 04:03:07 +00:00
nobu 4df4b48455 rbinstall.rb: syntax error in gemspec
* tool/rbinstall.rb (load_gemspec): do not hide syntax errors in
  a gemspec file.  check if the result instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-20 03:51:15 +00:00
kou 3ea72d2589 Ensure loading REXML
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-20 03:08:57 +00:00
kou 0d1abb904e rexml: upgrade to 3.1.8
See https://github.com/ruby/rexml/blob/master/NEWS.md for change summary.

Changes for spec/ has been reported: https://github.com/ruby/spec/pull/639


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-20 02:49:10 +00:00
normal 0b38221d4e thread_pthread.c (ubf_timer_disarm): ignore EINVAL iff timer is dead
The following race may happen if ubf_timer_destroy calls
timer_delete before ubf_timer_disarm gets called from
a different thread.  Consider the following timelines:

  ubf_timer_destroy                    | ubf_timer_disarm
  -------------------------------------+-----------------------------
                                       | CAS(ARM => DISARM)
  CAS(DISARM => DEAD)                  |
  timer_delete                         |
                                       | timer_settime(disarm)

Another option may be to add an intermediate "RTIMER_DISARMING"
state to the transition, but I figure the EINVAL check is
simpler and less intrusive code-wise.

cf. http://ci.rvm.jp/results/trunk-iseq_binary@silicon-docker/1545794

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-20 00:07:19 +00:00
svn cb3393add5 * 2018-12-20
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-19 19:01:04 +00:00
yuki 4760b6b54b * gems/bundled_gems: Upgrade the did_you_mean gem to 1.3.0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-19 19:01:02 +00:00
hsbt 097ee409be Update entry of Psych on NEWS file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-19 12:57:19 +00:00
hsbt f43a333dee Update entry of RubyGems on NEWS file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-19 12:46:29 +00:00
normal 4038d0137f webrick: add the ability to override res, req creation
So that a customized HTTPServer subclass can use it's own
Request/Response classes.

To apply the override, make a subclass of WEBrick::HTTPServer
and override the
`create_request_and_response(with_webrick_config)` method. The
method should return an Array of [request, response].

To check whether the Server supports this method (i.e. when
using older versions of WEBrick when needing this
functionality), you can ask the server if it responds to the
method

    server.respond_to?(:create_request_and_response)

This is backportable.

[ruby-core:69604] [Feature #11266]

From: Julik Tarkhanov <me@julik.nl>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-19 11:08:05 +00:00
hsbt 92e726628e Merge RubyGems 3.0.0 from upstream.
https://blog.rubygems.org/2018/12/19/3.0.0-released.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-19 07:20:17 +00:00
hsbt b0f6781e2f Update metadata of Bundler 1.17.2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-19 07:02:57 +00:00
duerst 13c15beb68 avoid passing unnecessary options to download method
The option --unicode-beta for tool/downloader.rb introduced in
r66448 must not be passed as an option to actual download machinery.
Thanks to MSP-Greg (Greg L.) for bug report and patch.
This closes issue #15434.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-19 04:08:46 +00:00
duerst eb2e931f6f add option to deal with Unicode beta data files
Unicode uses file names with explicit versions for beta publication.
This commit introduces a variable on the makefile level to distinguish
between beta and regular versions of file names.
 
common.mk: Define new variable UNICODE_BETA, usually set to NO,
but would be YES during tests with beta data files. Pass the value
of this variable to tool/downloader.rb with option --unicode-beta.

tool/downloader.rb: Receive and store value of --unicode-beta.
Raise an exception if value is YES, because we don't yet actually
deal with this case. Continue as usual if value is not YES.

This completes the changes needed in the makefile. Upcomming changes
will only affect tool/downloader.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-19 00:26:31 +00:00
kazu d1dce26b94 sample/fib.py: Fix syntax error in Python 3 [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-18 23:36:47 +00:00
normal a57acb731a thread_pthread.c (ubf_timer_destroy): more careful state transition
We must not call timer_destroy while another thread is
calling timer_settime to arm the timer.

cf. http://ci.rvm.jp/results/trunk-iseq_binary@silicon-docker/1541578

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-18 18:25:54 +00:00
nobu 75f36bdc1e Constified to fix warning at r66442
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-18 16:11:07 +00:00