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

49743 Коммитов

Автор SHA1 Сообщение Дата
nobu 0718f53bca thread.c: timespec_for is used only if poll() is used
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-04 01:31:48 +00:00
normal 05c18139a1 thread.c (thread_join_m): avoid NUM2TIMET for Bignum
Bignums exceed the range of time_t (or long).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-03 22:24:17 +00:00
normal c0e2f98f9b thread.c: avoid FP in C-API time calculations
FP arithmetic can lose precision in some cases leading to
premature wakeup and wasting CPU cycles.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-03 19:59:21 +00:00
normal c915390b95 thread.c: avoid FP for Thread#join
FP arithmetic can lose precision in some cases leading to
premature wakeup and wasting CPU cycles.

Convert to use timeval_* functions for now.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-03 19:59:16 +00:00
normal 712439b530 thread.c: extract timeval_sub from timeval_update_expire
It can be useful on its own.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-03 19:59:11 +00:00
svn 9ee7578937 * 2018-02-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-03 19:59:06 +00:00
normal 076d886398 thread.c (rb_thread_terminate_all): eliminate double2timeval call
No point for a fixed 1s value, and I plan on eliminating double
timeouts from internal API.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-03 19:59:05 +00:00
nobu 7036c4062e parse.y: named backslash
* parse.y: named backslash to show unexpected character.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-03 07:30:39 +00:00
normal bd5406dfa9 compile.c: fix string Range optimization with FSL
The optimization in [Feature #13355] needs to be detected
differently to work with "frozen_string_literal: true"

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-03 07:25:21 +00:00
nobu 55e606b36c parse.y: use lex_goto_eol to skip to EOL
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-03 07:21:58 +00:00
nobu 28490dd1fd process.c: command_name encoding
* process.c (rb_exec_fillarg): share subsequence of argv_buf for
  command_name, and copy the encoding from the command string.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-03 03:50:28 +00:00
nobu eaf301d2be backward.h: adjusted NORETURN declaration
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-03 01:57:00 +00:00
nobu da01eb93e4 eval.c: get rid of format-zero-length warning
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-02 23:25:42 +00:00
nobu 8b242a0d09 test_system.rb: tests without shell
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-02 16:44:22 +00:00
nobu 0d829c4af4 test_system.rb: exit by abort for portability
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-02 16:39:16 +00:00
nobu 2cbb6fa218 process.c: split pst_message_status from pst_message
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-02 16:14:21 +00:00
nobu 228bffe5e1 process.c: reduce intermediate string
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-02 16:10:17 +00:00
nobu 4c577c4a45 backward.h: rb_mod_const_missing is internal function
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-02 16:02:03 +00:00
svn 529850b7ca * 2018-02-03
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-02 15:16:23 +00:00
nobu 800a5e86cf eval.c: unnecessary argument
* eval.c (rb_interrupt): removed unnecessary convertsion specifier
  and an empty string.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-02 15:16:22 +00:00
nobu 9a74cc0a55 variable.c: removed old warning
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-02 13:29:23 +00:00
kazu 59f502295f Fix test
Followup to r62158

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-02 11:21:12 +00:00
kazu 02d7ad9722 Fix call-seq of NameError.new
`NameError.new(1,2,3)` raises
`wrong number of arguments (given 2, expected 0..1) (ArgumentError)`
in `StrandardError#initialize`, so NameError can't accept 3 or more arguments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-02 11:03:23 +00:00
kazu 1659a1660c Use more verbose status in error messages
of `system` with `exception: true` like `Process::Status#inspect`
[Feature #14386] [ruby-core:85013]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-02 11:03:22 +00:00
nobu 49e801c1c7 io.c: unused assignments
* io.c (fptr_finalize_flush): removed unused assignments.  if
  noraise, err is never used after set.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-02 08:30:57 +00:00
svn 80477c1dff * 2018-02-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-02 05:44:14 +00:00
nobu cc410b2a5c io.c: hoisted out io_fd_check_closed
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-02 05:44:13 +00:00
normal 7fdb4099cd array.c: remove rb_ary_frozen_p / Array#frozen?
This is redundant since r15206 /
ffe425ecaa as we no longer lock
the array during sort.  Instead, fall back to Object#frozen?

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-01 09:20:38 +00:00
hsbt 499658abff Add test for Forwardable#def_delegator with r55366.
Patch by @aycabta
  [Bug #12837][ruby-core:77611]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-01 09:07:16 +00:00
normal 7af65953de ccan/list: sync with upstream
This brings us up-to-date with ccan/list
5dbd87b876434dd703dfcc30cb0503118aac2076
git://git.ozlabs.org/~ccan/ccan

This is a combination of 3 commits from ccan:

    list: add parens to gaurd macro args in LIST_INIT
    ccan/list: Add list_empty_nocheck
    list: trivial: fix typos in list_for_each_off's documentation

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-01 08:59:27 +00:00
nobu 6eeb0f7ef4 ruby.h: relax rb_funcall(obj, id, 0, 0) case only
* include/ruby/ruby.h (rb_varargs_argc_valid_p): relax rb_funcall
  check on extra args only if argc == 0, for the compatibility
  with wrong code which is probably confused with rb_funcallv.
  [Bug #14425]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-01 03:55:55 +00:00
nobu 044e6f12be win32.c: EPIPE for ERROR_NO_DATA
* win32/win32.c (rb_w32_write): writing to closed pipe fails with
  ERROR_NO_DATA but msvcrt maps it to EINVAL.  map it to EPIPE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-01 02:56:28 +00:00
hsbt 6381d49801 Fixed duplicated typo for `the the`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-01 00:25:18 +00:00
nobu 00716bee78 io.c: fix comparison subject
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 17:35:27 +00:00
svn aff05774ad * 2018-02-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 17:26:21 +00:00
nobu 4139024e15 io.c: fix fptr_copy_finalizer
* io.c (fptr_copy_finalizer): fix inverted condition.  if
  finalizer does not change, pipe_list should not change too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 17:26:20 +00:00
nobu 4057ee5e8e io.c: fptr_copy_finalizer
* io.c (fptr_copy_finalizer): remove fptr from pipe_list when pipe
  became ordinary file, to fix access after free.  to be finalized
  by pipe_finalize and being in pipe_list must match.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 08:17:16 +00:00
hsbt 302825ced8 Update csv maintainers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 06:41:10 +00:00
nobu 1d5847d1af io.c: pipe_register_fptr
* io.c (pipe_register_fptr): get rid of double registration which
  causes access after free and segfault.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 04:24:57 +00:00
nobu 80d74ea732 io.c: simplified pipe_del_fptr
* io.c (pipe_del_fptr): merged code for the case fptr is first to
  the loop for the rest.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 04:02:18 +00:00
nobu e97cc46460 trick ruby-mode.el by heredocs
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 04:02:17 +00:00
kazu f1b7bf1047 Fix wrong function names in rb_bug messages [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 00:19:33 +00:00
svn e403fd8509 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-30 23:55:50 +00:00
normal 3ce9a14040 ruby.h: relax rb_funcall check on extra args for clang
clang 5.+ (tested clang 7.0.0) seems to be attempting division-by-zero
and giving a very large number for static args to rb_funcall.

* include/ruby/ruby.h (rb_varargs_bad_length): relax check for clang
* ext/-test-/funcall/funcall.c: renamed from passing_block.c
  define extra_args_name function
* test/-ext-/funcall/test_funcall.rb: new test
  [ruby-core:85266] [Bug #14425]

From: Eric Wong <e@80x24.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-30 23:55:49 +00:00
normal b10b51225e proc: fix super_method segfault after bind
* proc.c: handle undefined iclass
  [ruby-core:85231] [Bug #14421]

From: Eric Wong <e@80x24.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-30 19:35:12 +00:00
svn 1bb98357c9 * 2018-01-31
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-30 18:32:41 +00:00
normal 3474d5c306 net/http: fix documentation for HTTP connection reuse
Thanks to Paul Kuruvilla <rohitpaulk@gmail.com> for the patch

* lib/net/http.rb: fix documentation for HTTP connection reuse
  [ruby-core:84815] [Bug #14349]

From: Paul Kuruvilla <rohitpaulk@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-30 18:32:40 +00:00
kazu 1fd4a6936d Remove empty directories [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-30 12:13:47 +00:00
usa 369b74f899 simply show BASERUBY itself
* common.mk (showflags): simply show `BASERUBY` itself, because nmake does not
  supports backquote notation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-30 12:03:28 +00:00
nobu 51fdac39eb setup.mak: discard BASERUBY output
* win32/setup.mak: discard output from BASERUBY command, even if
  it contains multiple commands.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-30 11:12:21 +00:00