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

9710 Коммитов

Автор SHA1 Сообщение Дата
nobu 549a3b74c4 ripper: fix %-op on_operator_ambiguous
* parse.y (ambiguous_operator): separate token and string
  representation of operators, to fix %-operator argument.  in a
  warning message, needs to be escaped by '%' but the symbol
  should not be.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-12 03:15:34 +00:00
mrkn 70f772c3ef bigdecimal: version 1.3.1
Import bigdecimal version 1.3.1.  The full commit log is here:

  https://github.com/ruby/bigdecimal/compare/v1.3.0...v1.3.1

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-10 13:23:58 +00:00
ko1 38bc085f71 check thread deadness correctly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-10 08:15:39 +00:00
nobu 0f9554efa1 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/trunk@57589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-10 01:13:22 +00:00
kazu 07b88b2616 lib/base64.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-10 00:58:45 +00:00
kazu b15f8b6de9 lib/abbrev.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-09 16:12:00 +00:00
kazu 026ded9384 {ext,test}/zlib: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-07 12:49:57 +00:00
nobu 7511130721 test/unit.rb: old GNU make
* test/lib/test/unit.rb (Test::Unit::Parallel#non_options):
  support old GNU make, which uses --jobserver-fds option instead
  of --jobserver-auth.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-07 08:16:50 +00:00
nobu d686b02209 test_parallel.rb: match the count
* test/testunit/test_parallel.rb (test_should_run_all_without_any_leaks):
  match the final test count instead of progressing indicators.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-07 08:09:23 +00:00
nobu a02a8dfa5a test/unit.rb: most-asserted
* test/lib/test/unit.rb (Statistics#record): record most asserted
  tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-07 05:19:29 +00:00
nobu 8dedf08b52 test/unit.rb: defined
* test/lib/test/unit.rb (Test::Unit::Statistics#record): check if
  @longest is set first.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-07 03:58:07 +00:00
nobu 406c5252a2 test/unit: record in parallel
* test/lib/test/unit.rb (Test::Unit::Parallel#deal): deal with
  record.

* test/lib/test/unit/parallel.rb (Test::Unit::Worker#record):
  report test records to the master.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-07 03:55:47 +00:00
nobu 10c51ff5ce test/unit.rb: statistics
* test/lib/test/unit.rb (Test::Unit::Statistics): show statistics.
  only --longest option is implemented right now.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-07 02:49:04 +00:00
kazu a4fde3b60c {ext,test}/strscan: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-06 13:23:39 +00:00
naruse 643a935e96 @job_tokens is defined iff @jobserver is true
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-05 16:07:30 +00:00
kazu e3300dce82 {ext,test}/ripper: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-05 07:54:32 +00:00
nobu d4502a6767 test/unit.rb: jobserver for workers
* test/lib/test/unit.rb (Test::Unit::Parallel#process_args):
  initialize @run_options to pass jobserver auth pipes to worker
  processes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-04 05:23:48 +00:00
nobu 1f23dd016b test/unit.rb: job tokens
* test/lib/test/unit.rb (_run_parallel): deal with job tokens for
  each workers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-04 03:28:17 +00:00
nobu 36037442be test/unit.rb: initialize instance variable
* test/lib/test/unit.rb (Test::Unit::Parallel#non_options):
  initialize @jobserver instance variable to suppress warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-04 02:17:35 +00:00
nobu fbdec8186e test_gem.rb: exclude default gems
* test/rubygems/test_gem.rb: check difference to exclude default
  gems from the expected results.  [Feature #13186]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-04 01:04:14 +00:00
marcandre 4d7b999c77 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/trunk@57515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-03 18:25:28 +00:00
nobu 0fe47fad55 test/unit.rb: share job slots
* test/lib/test/unit.rb (Test::Unit::Parallel#_run_parallel):
  share job slots with GNU 'make'.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-03 12:52:09 +00:00
nobu 953093e2a4 test/unit.rb: job testing flag
* test/lib/test/unit.rb (Parallel#non_options): split testing flag
  and job count by OptionParser.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-03 12:52:08 +00:00
nobu 2aaca10505 eval.c: hide internal objects
* eval.c (rb_ensure): veil internal exception objects not to leak
  in ensure functions.  [ruby-core:79371] [Bug #13176]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-03 06:23:34 +00:00
kazu 14ccf1262a Add class name to assert messages
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02 12:38:41 +00:00
nobu c373866444 escape.c: check argument
* ext/cgi/escape/escape.c (optimized_unescape): check
  accept_charset encoding argument.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02 08:02:36 +00:00
nobu 7d0d0d5864 test_cgi_util.rb: encoding tests
* test/cgi/test_cgi_util.rb (test_cgi_unescape): \u is useless on
  old versions.

* test/cgi/test_cgi_util.rb (test_cgi_include_unescape): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02 07:03:59 +00:00
nobu 57b6d6032c test_iseq_load.rb: refine test_require_integration
* test/-ext-/iseq_load/test_iseq_load.rb (test_require_integration):
  assert with diff.

[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02 05:43:58 +00:00
nobu ab6a38c9e5 test_time.rb: use UTC
* test/ruby/test_time.rb (test_strftime_no_hidden_garbage): fix
  failure due to timezone offset.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-01 22:18:28 +00:00
nobu 1a0eaede42 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/trunk@57492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-01 22:14:22 +00:00
tenderlove ef76e3cfb6 Add IMEMO type to heap dump output.
IMEMO objects have many types.  Without this change, we cannot see what
types of IMEMO objects are being used when dumping the heap.  Adding the
type to the IMEMO object will allow us to gather statistics about IMEMO
objects being used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31 17:46:51 +00:00
rhe 8795838fcb openssl: import v2.0.3
Import Ruby/OpenSSL 2.0.3. Only bugfixes. The full commit log since
2.0.2 (imported at r57146) can be found at:

  https://github.com/ruby/openssl/compare/v2.0.2...v2.0.3

----------------------------------------------------------------
Corey Bonnell (1):
      Fix for ASN1::Constructive 'each' implementation

Kazuki Yamaguchi (10):
      Fix build with static OpenSSL libraries on Windows
       ([ruby-core:78878] [Bug #13080])
      Merge pull request #96 from CBonnell/master
      Merge branch 'topic/windows-static-linking-without-pkg-config' into maint
      appveyor.yml: update OpenSSL version to 1.0.2j
      buffering: fix typo in doc
      test/envutil: fix assert_raise_with_message
      x509: fix OpenSSL::X509::Name#eql?
       ([ruby-core:79310] [Bug #13170])
      ruby-openssl-docker: update versions of Ruby and OpenSSL
      .travis.yml: test with Ruby 2.4
      Ruby/OpenSSL 2.0.3

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31 10:08:22 +00:00
ko1 bfdfc99cc2 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.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31 07:00:38 +00:00
normal 9b69e9fafc time.c (time_strftime): avoid garbage in common case
strftime format strings which are dynamically-generated will benefit
from avoiding garbage, here.

* time.c (time_strftime): use rb_str_tmp_frozen_{acquire,release}
* test/ruby/test_time.rb (test_strftime_no_hidden_garbage): new test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31 02:18:58 +00:00
nobu bef93a2ddf test_io.rb: separate a test
* test/ruby/test_io.rb (test_closed_stream_in_rescue): run in a
  separated process.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31 01:18:10 +00:00
normal ba5aa60668 sprintf.c: avoid garbage in common (no exception) case
Format strings which are dynamically-generated will benefit
from this.  This won't cover exceptions, but exceptions for
sprintf should be too uncommon to care about (unlike IO)

* sprintf.c (rb_str_format): use rb_str_tmp_frozen_{acquire,release}
* test/ruby/test_sprintf.rb (test_no_hidden_garbage): new test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31 00:41:56 +00:00
normal 4b9a21cdd6 io.c (rb_io_syswrite): avoid leaving garbage after write
As with IO#write, IO#syswrite also generates garbage which can
be harmful in hand-coded read-write loops.

* io.c (swrite_arg, swrite_do, swrite_end): new
  (rb_io_syswrite): use new functions to cleanup garbage
  [ruby-core:78898] [Bug #13085]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30 22:03:57 +00:00
normal 5c988df0dd string.c (rb_str_tmp_frozen_release): release embedded strings
Handle the embedded case first, since we may have an embedded
duplicate and non-embedded original string.

* string.c (rb_str_tmp_frozen_release): handled embedded strings
* test/ruby/test_io.rb (test_write_no_garbage): new test
  [ruby-core:78898] [Bug #13085]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30 21:54:32 +00:00
shyouhei 8ad7429644 make FIXNUM_MAX visible from Ruby
Because our tests now have several places where FIXNUM_MAX is needed,
we decided to provide it along with several other constants.

	* template/limits.c.tmpl: new file, defining RbConfig::Limits

	* ext/rbconfig/sizeof/depend (limits.c): rule to generate limits.c

	* test/-ext-/num2int/test_num2int.rb: use RbConfig::Limits

	* bootstraptest/test_insns.rb: ditto.

	* .gitignore: ignore new generated file.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30 10:12:18 +00:00
nobu 6cc463cac9 reduce iterations for slower machines
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30 05:09:13 +00:00
nobu 9b0118a84c refine assertions
* test/irb/test_ruby-lex.rb (test_prompt): invert confinue flag by
  FIXME comments.  adjust line numbers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30 04:47:44 +00:00
nobu d617fce9ab more checks for prompt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30 03:57:46 +00:00
nobu 5a48f20c33 test for prompt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30 03:21:15 +00:00
nobu 62acbb9805 test for immature statement
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-29 12:53:24 +00:00
nobu 1997f7807b test for top level statement
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-29 12:53:23 +00:00
nobu 3abb4948b2 test for comment
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-29 12:20:26 +00:00
nobu 25ad4a7907 tests for irb lexer
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-29 09:51:55 +00:00
kazu b9d8758e26 {ext,test}/etc: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-29 01:35:23 +00:00
nobu 1127a366fd test/unit.rb: minimum workers
* test/lib/test/unit.rb (_run_parallel): launch only necessary
  workers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-28 11:27:32 +00:00
kazu 886e805799 {ext,test}/dbm: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-28 04:36:08 +00:00