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

46203 Коммитов

Автор SHA1 Сообщение Дата
nobu 7206ac5492 thread_win32.c: no GVL for interrupt_event
* thread_win32.c (w32_wait_events): do not acquire GVL, to fix
  deadlock at read/close race condition.  instead, just ignore
  interrupt_event if it is closed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-16 14:27:21 +00:00
nobu 04b618e53e test/ruby/test_io.rb: use Thread.stop? to wait
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-16 04:16:11 +00:00
usa d8ea05c126 * test/ruby/test_io.rb (test_race_closed_stream): separate because it stops
entire test process on Windows.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-16 02:00:24 +00:00
svn c747848d98 * 2017-04-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-15 15:29:09 +00:00
nobu df76f366a7 bignum.c: fix inexact estimation
* bignum.c (estimate_initial_sqrt): estimated square root is
  inexact if it is not equal to its ceil, needs Newton's method.
  [ruby-core:80696] [Bug #13440]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-15 15:29:09 +00:00
svn 5fb0f3f022 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-15 07:13:06 +00:00
normal d6a6971212 fix ext/-test-/struct/ dependencies
I started writing a template for auto-generation and
let "tool/update-deps --fix" fill in the rest.

Hopefully this fixes problems with some CI builds
after r58359.  Further changes to other ext/-test-/
files should probably add or update "depend" files, too.

* ext/-test-/struct/depend: new file
* enc/depend: auto-updated with unicode 9.0.0 headers (side-effect)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-15 07:13:05 +00:00
nobu 5e635a3678 signal.c: last tag page condition
* signal.c (check_stack_overflow): drop the last tag when it is
  close to the fault page, not same as sp page.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-15 02:37:21 +00:00
nobu 0472578b26 ruby.h: check argc to rb_funcall
* include/ruby/ruby.h (rb_funcall): check if argc matches the
  number of variadic arguments, and replace with rb_funcallv.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-15 02:09:27 +00:00
nobu 6f1fbfd618 signal.c: prefer pthread_sigmask
* signal.c (raise_stack_overflow): prefer pthread_sigmask to
  sigprocmask, for multithreading.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-15 02:07:01 +00:00
svn fd421a9af0 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-15 00:46:01 +00:00
normal 8e64799c96 fix RSTRUCT_LEN macro in public C API
rb_struct_size returns an Integer VALUE, so it must be converted
to a `long` for compatibility with previous Ruby C API versions.

* ext/-test-/struct/len.c: new
* test/-ext-/struct/test_len.rb: new
* include/ruby/ruby.h (RSTRUCT_LEN): use NUM2LONG
  [ruby-core:80692] [Bug #13439]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-15 00:46:00 +00:00
ngoto f687a147eb Workaround for optimization bug of Oracle Solaris Studio 12.4 and 12.5
* pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for
  optimization bug of Oracle Solaris Studio 12.4 and 12.5
  (Oracle Developer Studio 12.5) on Solaris with -xO4 optimization
  option. [Bug #11684] [ruby-core:80690]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-14 19:12:51 +00:00
ko1 db2822a5bc sync certainly.
* test/ruby/test_io.rb (test_race_closed_stream): awit for 'sleep' state.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-14 18:19:37 +00:00
ko1 2ad7a741c0 more explicit synchronization.
* test/ruby/test_io.rb (test_race_closed_stream): wait for blocking by r.gets.
  On some systems (for example, high load average systems) can't start Thread
  correctly and can't wait r.gets in invoked Thread.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-14 18:14:25 +00:00
svn e4c2f4fa26 * 2017-04-15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-14 16:07:46 +00:00
nobu f7b51fd28d signal.c: add sigprocmask guard
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-14 16:07:45 +00:00
nobu 1e1a585300 signal.c: unblock signal
* signal.c (raise_stack_overflow): unblock the received signal, to
  receive the same signal again.  [ruby-core:79285] [Bug #13164]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-14 12:59:59 +00:00
nobu d005ada1b8 configure.in: sigsetjmp sivesigs flag
* configure.in (RUBY_SETJMP_TYPE): optional flag to save signal
  mask.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-14 12:51:46 +00:00
nobu 8c84803d80 IPSocket#inspect
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-14 10:03:43 +00:00
nobu cb52dda146 ruby.h: check argc to rb_yield_values
* include/ruby/ruby.h (rb_yield_values): check if argc matches the
  number of variadic arguments, and replace with rb_yield_values2.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-14 08:33:08 +00:00
ko1 c50afaa1c9 disable rewind hooks.
* vm.c (hook_before_rewind): skip rewind hooks if err is SystemStackError
  because rewind hooks can cause stack overflow again and again.

* thread.c (ruby_thread_stack_overflow): do not disable all hooks.
  Additionally, clearing ruby_vm_event_flags is not suitable way
  to disable hooks.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-14 07:46:11 +00:00
svn 3eb7a6eb0b * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-14 05:19:12 +00:00
mrkn 8561baf340 Improve performance of type conversion using to_r
* object.c: Add to_r in conv_method_tbl.

* defs/id.def: add to_r.

* benchmark/bm_int_quo.rb: added.

* benchmark/bm_time_subsec.rb: added.

[Bug #13426]
[ruby-core:80665]
[Fix GH-1582]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-14 05:19:12 +00:00
ko1 3c547e1129 increase timeout seconds.
* test/ruby/test_trace.rb (test_trace_stackoverflow): on some platforms
  this test fails because of timeout.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-14 02:19:39 +00:00
nobu 5bca8051af rbinstall.rb: no file list for default gems
* tool/rbinstall.rb (default-gems): no file list is used now.
  all files should be installed as standard libraries.
  [ruby-core:80667] [Bug #13428]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-14 00:45:49 +00:00
nobu 03421631bd git-refresh: fix abort by cd failure
* tool/git-refresh: try `cd -P` in a subshell, because Solaris10
  sh dies if it fails, not only the command.
  [ruby-dev:50074] [Bug #13433]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-14 00:45:48 +00:00
ko1 197ebcb083 fix last commit
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-13 16:32:20 +00:00
svn e2d68989d4 * 2017-04-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-13 16:19:46 +00:00
ko1 4032f45dc2 Terminate created threads.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-13 16:19:46 +00:00
svn f8bb720eb7 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-13 09:25:39 +00:00
mrkn cb8012f5c0 array.c: improve performance of Array#sort with block
* array.c (sort_1): improve performance of Array#sort with block

* benchmark/bm_array_sort_block.rb: added for Array#sort with block

[Bug #13344]
[ruby-dev:50027]
[Fix GH-1544]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-13 09:25:38 +00:00
svn 53430e355a * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-13 08:09:07 +00:00
mrkn c121171525 Add a benchmark script for Array#sort of float array
[Bug #13340]
[ruby-dev:50023]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-13 08:09:06 +00:00
nobu 5710857456 git-refresh: for symlink srcdir
* tool/git-refresh: use `cd -P` for symlink srcdir.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-13 08:08:04 +00:00
nobu e1557424b3 git-refresh: fix expr
* tool/git-refresh (dir): surround by slashes to extract base
  name.  [ruby-dev:50070] [Bug #13424]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-13 07:52:05 +00:00
nobu 38174633e2 thread.c: disable VM events when stack overflow
* thread.c (ruby_thread_stack_overflow): disable VM events when
  stack overflow occurred; it causes another stack overflow again
  in making backtrace object, and crashes.
  [ruby-core:80662] [Bug #13425]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-13 07:38:23 +00:00
mrkn 1b5acc876b array.c: Improve performance of Array#sort with float elements
* array.c (sort_2): improve performance of Array#sort with float elements.

* internal.h (cmp_opt_Float, cmp_opt_data): added for checking whether or not
  Float#<=> can be optimizable.

* numeric.c (rb_float_cmp): added for internal use.

* internal.h (rb_float_cmp): ditto.

[Bug #13340]
[ruby-dev:50023]
[Fix GH-1539]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-13 07:22:35 +00:00
rhe 4e85feed33 array.c: report correct memsize for shared root arrays
For a shared array root, struct RArray::as.heap.aux.capa stores the
number of Arrays holding reference to that T_ARRAY instead of the actual
heap-allocated capacity. Use ARY_CAPA() macro which handles this
appropriately.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-13 06:43:17 +00:00
stomar 55d0da5105 unicode_normalize.rb: improve docs
* lib/unicode_normalize.rb: [DOC] improve docs for
  String#{unicode_normalize,unicode_normalized?}: rdoc formatting,
  adopt style of other String methods (drop heading and "Examples").

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-12 19:49:48 +00:00
svn 5a555505d7 * 2017-04-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-12 18:07:33 +00:00
stomar 0c10564dd9 nodoc UnicodeNormalize module
* lib/unicode_normalize/normalize.rb: [DOC] nodoc the
  internal UnicodeNormalize module.
* lib/unicode_normalize/tables.rb: ditto.
* template/unicode_norm_gen.tmpl: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-12 18:07:32 +00:00
nobu a1caed95cb thread.c: during GC for thread
* thread.c (ruby_thread_stack_overflow): check if the given thread
  is during GC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-12 14:47:50 +00:00
nobu 796e995007 rbinstall.rb: purge `git ls-files`
* tool/rbinstall.rb (load_gemspec): purge `git ls-files` generated
  by bundle.  it is not available always everywhere everytime.
  [ruby-dev:50068] [Bug #13423]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-12 08:39:19 +00:00
hsbt fa3a612e2e Import latest gemspec from ruby/fileutils.
* Bump version to 0.7.1. Beucause fileutils-0.7 is alread reserverd
    on rubygems.org.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-12 08:12:53 +00:00
nobu f91985b34d git-refresh: for old sh
* tool/git-refresh: get rid of matching prefix pattern removal for
  old sh.  [ruby-dev:50069] [Bug #13424]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-12 05:22:36 +00:00
hsbt d9df358ea8 Use `assert_raise` instead of `assert_raises`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-12 00:21:20 +00:00
hsbt 83735ba29a Merge json-2.0.4.
* https://github.com/flori/json/releases/tag/v2.0.4
  * 09fabeb03e/CHANGES.md (2017-03-23-204)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-12 00:21:18 +00:00
svn 76ab146ca3 * 2017-04-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-11 22:41:21 +00:00
hsbt ffa55136c4 Merge upstream of ruby/etc.
* Do not use `git ls-files` for file listing.
  * Fix extconf.rb path.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-11 22:41:21 +00:00