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

45283 Коммитов

Автор SHA1 Сообщение Дата
nobu e53e986082 compile.c: constify
* compile.c (method_for_self): constify an argument of build
  function for VC6.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-24 13:19:50 +00:00
nobu 44a4d7b057 time.c: fix type of usec2subsecx
* time.c (usec2subsecx): fix return type, which is a numeric
  object but not a long int.  [ruby-dev:49912] [Bug #13066]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-24 12:21:52 +00:00
nobu 4e41d5dedd time.c: remove debug code
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-24 12:19:23 +00:00
nobu 65a884ebad time.c: fix typo in value_insane_p
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-24 11:56:12 +00:00
nobu e4aac80a71 test/unit.rb: restore parallel option
* test/lib/test/unit.rb (_run_parallel): restore parallel option
  after retrying for --repeat-count option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-24 09:22:21 +00:00
nobu 52acc428f0 test/unit.rb: --subprocess-timeout-scale option
* test/lib/envutil.rb (EnvUtil#invoke_ruby): add subprocess
  timeout scaling factor.

* test/lib/test/unit.rb (Test::Unit::SubprocessOption): add
  --subprocess-timeout-scale option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-24 00:51:01 +00:00
nobu 642b3a260b test/unit.rb: --repeat-count option
* test/lib/test/unit.rb (Test::Unit::RepeatOption): --repeat-count
  option to repeat COUNT times while success.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-24 00:50:59 +00:00
svn cad799b006 * 2016-12-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-23 16:09:10 +00:00
naruse 68cd029ae8 Add ruby_2_4 branch to test on travis [skip ci]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-23 16:09:09 +00:00
naruse dea8ea61ea Increase timeout
http://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20161223T113301Z.fail.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-23 14:54:04 +00:00
nobu 2af72edd72 assertions.rb: prepare_syntax_check
* test/lib/test/unit/assertions.rb (prepare_syntax_check): extract
  common preparation of arguments from assert_valid_syntax and
  assert_syntax_error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-23 03:22:36 +00:00
nobu 6b5f927718 assertions.rb: syntax check by iseq
* test/lib/test/unit/assertions.rb (assert_valid_syntax): use
  RubyVM::InstructionSequence.compile to get rid of executing the
  code, instead of catch&throw.  sample/trick2015/kinaba/entry.rb
  no longer raises an Invalid return.

* test/lib/test/unit/assertions.rb (assert_syntax_error): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-23 03:22:35 +00:00
nobu 11e386cf6c time.c: inquire suspicious values
* time.c (time_arg): dump sec and subsec arguments if subsecx is
  insane.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-23 00:05:40 +00:00
nobu 1c16a35017 test_modify_expand.rb: skip if no overflow
* test/-ext-/string/test_modify_expand.rb (test_integer_overflow):
  no longer happens on platforms where size_t is larger than long,
  e.g. 64bit windows, since r57122.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-22 23:20:00 +00:00
nobu bd2e1034d5 time.c: inquire suspicious values
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-22 22:34:18 +00:00
nobu d124fa3a35 string.c: suppress a warning
* string.c (rb_str_casecmp_p): [DOC] use Unicode escape form to
  get rid of warning C4819 by Microsoft Visual C++.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-22 22:16:19 +00:00
svn 0c9d4525f6 * 2016-12-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-22 20:58:55 +00:00
nobu 353395f969 get rid of implicit signedness conversions
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-22 20:58:55 +00:00
yui-knk 2a6727b566 test_float.rb: add test cases for Float#round
* test_float.rb: add test cases for Float#round with
  half nil. Follow up r57130.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-22 10:29:40 +00:00
naruse 5153260c30 suppress warning: implicit conversion changes signedness
It causes [Bug #13060]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-22 09:44:30 +00:00
rhe ac8f9a0af7 io.c: [DOC] update outdated documentation of ARGF.close
As of Ruby 2.3, IO#close no longer raises IOError if the file is already
closed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-22 04:40:28 +00:00
hsbt a1f3d0b693 Update xmlrpc-0.2.1 for Ruby 2.4.0 release.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-22 03:53:53 +00:00
nobu c83f23ad52 test_rinda.rb: ipv6_mc
* test/rinda/test_rinda.rb (RingIPv6#ipv6_mc): extract IPv6
  multicast setup and cleanup, and ignore ENETDOWN.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-22 02:00:02 +00:00
rhe b7458f20ff openssl: import v2.0.2
Import Ruby/OpenSSL 2.0.2. This release contains only bugfixes. The full
commit log since 2.0.1 (imported at r57041) can be found at:

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

----------------------------------------------------------------
Kazuki Yamaguchi (5):
      ssl: check for SSL_CTX_clear_options()
      Rename functions in openssl_missing.c
      ssl: use SSL_SESSION_get_protocol_version()
      pkey: allow instantiating OpenSSL::PKey::PKey with unsupported key type
      Ruby/OpenSSL 2.0.2

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-22 01:43:41 +00:00
mrkn bd288dcc8b bigdecimal: version 1.3.0
Import bigdecimal version 1.3.0.  The full commit log is here:

  https://github.com/ruby/bigdecimal/compare/v1.3.0.pre.2...v1.3.0

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 15:35:29 +00:00
svn 4f618f5a00 * 2016-12-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 15:21:20 +00:00
ngoto 9022401809 regcomp.c: Fix compile error with old version of fcc on Solaris
* regcomp.c (get_min_match_length): Fix compile error with old version
  of fcc (Fujitsu C Compiler) on Solaris 10. [Bug #13059][ruby-dev:49909]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 15:21:19 +00:00
nobu edaf4500f8 time.c: debug print
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 13:46:46 +00:00
yui-knk ea6510b862 numeric.c: remove not used lines
* numeric.c (rb_num_get_rounding_option): remove not used
  lines. After r57130 these lines are never reached.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 13:26:16 +00:00
nobu 5518b5c21a time.c: refine num_exact error message
* time.c (num_exact): show the original argument when conversion
  failed, instead of intermediate nil.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 12:06:40 +00:00
nobu 33e8eef020 time.c: use RB_TYPE_P
* time.c (time_timespec): use RB_TYPE_P instead of switching by
  TYPE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 12:05:41 +00:00
nobu 23ba6b2eb9 st.c: suppress a warning
* st.c (st_hash): suppress unused label warning on 32bit
  platforms.  fix up r57134.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 11:20:02 +00:00
nobu 1729243bba 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/trunk@57137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 11:12:39 +00:00
usa de59178aaf * win32/win32.c (winnt_stat): use `numberof` macro instead of constant.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 08:13:42 +00:00
usa 5d6ace6121 Fixed potentially buffer overrun.
* win32/win32.c (winnt_stat): the return value of `get_final_path` is the
  expected buffer length, not the actuall filled length.

* win32/win32.c (winnt_stat): `finalname` may be accessed in the outer block of
  its definition via `path`.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 07:50:14 +00:00
nobu c0ff5f4dd7 st.c: fix st_hash* functions [Bug #13019]
Previous implementation had an issues:
- macros murmur1 assumes murmur_step takes rotation value
  as a second argument
- but murmur_step second argument is "next block"
- this makes st_hash_uint and st_hash_end to not mix high bits of
  hash value into lower bits
- this leads to pure hash behavior on doubles and mixing hashes using
  st_hash_uint.
  It didn't matter when bins amount were prime numbers, but it hurts
  when bins are powers of two.

Mistake were created cause of attempt to co-exist Murmur1 and Murmur2
in a same code.

Change it to single hash-function implementation.
- block function is in a spirit of Murmur functions,
  but handles inter-block dependency a bit better (imho).
- final block is read in bit more optimal way on CPU with unaligned word access,
- final block is mixed in simple way,
- finalizer is taken from MurmurHash3 (it makes most of magic :) )
  (64bit finalizer is taken from
  http://zimbry.blogspot.ru/2011/09/better-bit-mixing-improving-on.html)

Also remove ST_USE_FNV1: it lacks implementation of many functions,
and looks to be abandoned

Author: Sokolov Yura aka funny_falcon <funny.falcon@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 06:22:16 +00:00
akr 7a4fe57adb [DOC] itemize values for half option of Float#round.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 05:26:35 +00:00
nobu 342f10b9b3 compile.c: toplevel return
* compile.c (iseq_compile_each): stop execution of the current source
  by toplevel return.  [ruby-core:36785] [Feature #4840]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 01:58:32 +00:00
nobu 581b995c54 numeric.c: rdoc of half option [ci skip]
* numeric.c (flo_round): [DOC] mention half option.  [Bug #12548]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 01:29:58 +00:00
nobu 114d1751dc numeric.c: allow nil as rounding mode option
* numeric.c (rb_num_get_rounding_option): allow nil same as the
  default behavior, per [ruby-core:77961].  [Bug #12548]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 01:29:57 +00:00
nobu 0adce99357 rdoc for r57126 [ci skip]
* ext/zlib/zlib.c: [DOC] update as keyword arguments.
  [Feature #13020]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20 17:15:37 +00:00
svn 94e97c898f * 2016-12-21
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20 16:02:22 +00:00
naruse f3d0c2729a suppress warning: attempt to close unfinished zstream; reset forced.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20 16:02:22 +00:00
naruse ba568c0ea3 Zlib.gzip uses kwargs instead of argc [Feature #13020]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20 16:02:21 +00:00
nobu 1cc9c93ff9 io.c: update argf lineno
* io.c (argf_rewind): rewind line number in non-global ARGF
  instance.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20 08:25:03 +00:00
nobu 9b6e1a9f38 io.c: update argf lineno
* io.c (argf_block_call_line): update line number in non-global
  ARGF instance.  [ruby-core:78728] [Bug #13051]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20 08:25:02 +00:00
rhe dc2d359b70 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/trunk@57123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20 07:32:23 +00:00
rhe 44ba4fd362 string.c: add missing size_t cast
Add size_t cast to avoid signed integer overflow. r56157 ("string.c:
avoid signed integer overflow", 2016-09-13) missed this. Suppresses
UBSan.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20 06:53:45 +00:00
rhe b5da45d6d7 array.c: do not resize to less than 0
Shrinking the Array from the block invoked by Array#select! or
Array#reject! causes the Array to be a negative number size. Ensure that
the resulting Array won't be smaller than 0.
[ruby-core:78739] [Bug #13053]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20 06:53:44 +00:00
yuki 2034248712 * gems/bundled_gems: Upgrade the did_you_mean gem to 1.1.0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20 06:53:17 +00:00