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

52082 Коммитов

Автор SHA1 Сообщение Дата
shirosaki 2a11904214 dir.c: performance fix with braces
Braces were expended before ruby_glob0(). This caused to call
replace_real_basename() for same plain patterns repeatedly.
Move blace expansion into glob_helper() in ruby_glob0() to reduce
replace_real_basename() call.
This fix changes the order of glob results.
[Feature #13167] [Fix GH-1864]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-22 01:11:40 +00:00
nobu c61adf51a3 configure.ac: prepend the wrapper after CPP is set
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-21 13:52:03 +00:00
nobu 0d95805c2e Suppress more -Wparentheses warnings
[Fix GH-1958]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-21 10:31:11 +00:00
svn 2def52500f * expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-21 10:19:14 +00:00
nobu 7e9ee35fb8 Remove -Wno-parentheses flag.
[Fix GH-1958]

From: Jun Aruga <jaruga@redhat.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-21 10:19:10 +00:00
kazu 2617dfa9bd Fix sample code [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-21 08:53:11 +00:00
kazu 0744b375b8 Fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-21 08:34:25 +00:00
svn 8987431408 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-21 07:19:14 +00:00
nobu d00199a139 darwin-cc: hide ld warnings
* tool/darwin-cc: ld in Apple's recent Xcode warns text-based stub
  files, which are probably caused by Apple's broken package.
  hide such (and architecture deprecation) warnings during
  configuration to pass TRY_LDFLAGS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-21 07:19:13 +00:00
svn 02cb9c932a * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-21 06:41:09 +00:00
ko1 ac4b2d990c escape all env properly.
* vm_backtrace.c (rb_debug_inspector_open): escape all env using
  `rb_vm_stack_to_heap()` before making bindings.
  [Bug #15105]

  There is a complicated story of this issue:
  Without this patch, IFUNC frame does not escaped. A IFUNC frame
  points to CFUNC ep as previous ep. However, CFUNC ep can be escaped
  because of making bindings of Ruby level frames.
  IFUNC's ep can points to invalidated ep and `rb_iter_break()` will
  fail. This is why `any?` fails.

* test/-ext-/debug/test_debug.rb: add a test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-21 06:41:07 +00:00
ko1 a810a1a78c fix typo.
* vm_exec.h (DEBUG_END_INSN()): use `ec` instead of `th`.
  This macro is used when `VMDEBUG > 0`.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-21 06:30:54 +00:00
kazu e5a3bfb3da Fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-21 02:14:33 +00:00
svn 9b2cf4fb28 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-20 18:24:17 +00:00
marcandre 19fe6552c4 Matrix: Add #reflexive? method. [Fix GH-1730]
Adapted from a patch by Yilo

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-20 18:24:16 +00:00
svn a64338ce44 * 2018-09-21
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-20 15:06:57 +00:00
nobu abe75149d1 Enumerable#to_h with block and so on
[Feature #15143]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-20 15:06:56 +00:00
nobu e76eebd79b Ignore Xcode linker warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-20 14:30:21 +00:00
mame 32cff956bc * compile.c (compile_case): emit opt_case_dispatch only on optimized mode
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-20 07:36:10 +00:00
shyouhei d6d444d6b2 fix typo [ci skip]
This error does not happen right now so this typo is
not serious, unless you locally edit insns.def.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-20 05:31:51 +00:00
nobu ce079f1651 Introduce rb_ary_union_hash method in Array
Avoid repeating code and improve readability in `rb_ary_or` and
`rb_ary_union_multi`. Similaty as done with `rb_ary_union`.

[Fix GH-1747] [Feature #14097]

From: Ana María Martínez Gómez <ammartinez@suse.de>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-20 03:18:54 +00:00
nobu 4c08223945 Link Array#union from | method
`Array#uniq` is not really related with `Array#|`, so I replaced it by
`Array#union`.

[Fix GH-1747] [Feature #14097]

From: Ana María Martínez Gómez <ammartinez@suse.de>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-20 03:18:54 +00:00
nobu d0f9184f8b Introduce rb_ary_union method in Array
Avoid repeating code and improve readability in `rb_ary_or` and
`rb_ary_union_multi`.

[Fix GH-1747] [Feature #14097]

From: Ana María Martínez Gómez <ammartinez@suse.de>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-20 03:18:53 +00:00
nobu 744e816f55 Add union method to Array
I introduce a `union` method equivalent to the `|` operator, but which
accept more than array as argument. This improved readability, and it
is also coherent with the `+` operator, which has a similar `concat`
method. The method doesn't modify the original object and return a new
object instead. It is plan to introduce a `union!` method as well.

Tests and documentation are included.

It solves partially https://bugs.ruby-lang.org/issues/14097

[Fix GH-1747] [Feature #14097]

From: Ana María Martínez Gómez <ammartinez@suse.de>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-20 03:18:52 +00:00
nobu d325d74174 parse.y: fix block passing with empty kwargs
* parse.y (arg_blk_pass): preceeding arguments node may be NULL when
  an empty keyword argument hash splat is optimized away.
  [ruby-core:88890] [Bug #15087]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-20 01:43:35 +00:00
svn b06bcff42d * 2018-09-20
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-19 17:12:05 +00:00
marcandre d93dcd2840 net/http: Improve net/http header error message.
Patch by Matt Larraz. [Fix GH-1849].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-19 17:12:04 +00:00
kazu 4baf0757e4 ruby_2_2 branch has ended
https://www.ruby-lang.org/en/news/2018/06/20/support-of-ruby-2-2-has-ended/
[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-19 12:39:44 +00:00
normal 41cf596dfd process.c (waitpid_cleanup): unconditionally remove from waiters
This is the safer option, as there seems to be cases where checking
waitpid_state.ret is insufficient in ensure.  I'm not 100% sure
why this is, but this change was required for my work-in-progress
Thread::Light patch series, too...

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-19 08:23:19 +00:00
mame f0f13cff72 * hash.c (rb_hash_update): fix indent
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-19 02:10:58 +00:00
marcandre f7f216ed37 [DOC] Add changes to Hash#merge in NEWS [#15111]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-19 02:10:05 +00:00
mame bfbf9bd6d3 * hash.c (rb_hash_update): remove a meticulous explanation
As per Marc-Andre's comment.  [Refs GH-1951]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-19 02:07:33 +00:00
svn d6a06a768c * 2018-09-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-19 01:59:27 +00:00
mame 085f5ef957 * hash.c (rb_hash_merge): Accepts zero or more hashes as arguments
Hash#merge, merge!, and update could merge exactly two hashes.
Now, they accepts zero or more hashes as arguments so that it can merge
hashes more than two.

This patch was created by Koki Ryu <liukoki@gmail.com> at Ruby Hack
Challenge #5.  Thank you!
[ruby-core:88970] [Feature #15111] [Fix GH-1951]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-19 01:59:26 +00:00
svn a4675d9d80 * expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-18 13:52:08 +00:00
k0kubun e7db9df982 vm_insnhelper.c: always use bool-ish value
for CC_SET_FASTPATH condition. Just a cosmetic change to unify the
styling with other lines.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-18 13:52:06 +00:00
nobu c49559f1c1 Skip EHOSTUNREACH by host issues
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-18 12:55:05 +00:00
svn 36850b789c * expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-18 12:48:31 +00:00
k0kubun 62327bb6ff vm_insnhelper.h: rename CI_SET_FASTPATH to CC_SET_FASTPATH
because it's actually setting fastpath to cc instead of ci since r51903.

vm_insnhelper.c: ditto
mjit_compile.c: ditto
tool/ruby_vm/views/_mjit_compile_send.erb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-18 12:48:28 +00:00
nobu 742df62eb7 pty.c: typo
* ext/pty/pty.c (chfunc): fix a typo of an operator.  pointed out by
  jaruga (Jun Aruga) at [ruby-core:89058].  [Bug #15116]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-18 09:15:46 +00:00
nobu aefdd4e25f Lazy Enumerator reduce intermediate array creation
[ruby-core:87907] [Bug #14908] [Fix GH-1912]

From: Anmol Chopra <chopraanmol1@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-18 08:49:40 +00:00
hsbt ec6c075702 Merge upstream revision of rubygems/rubygems.
This commits includes tiny bugfix and new features listed here:
    * Add --re-sign flag to cert command by bronzdoc: https://github.com/rubygems/rubygems/pull/2391
    * Download gems with threads. by indirect: https://github.com/rubygems/rubygems/pull/1898

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-18 08:37:18 +00:00
nobu 3367daf716 Tests of Enumerator::Yielder#yield with multiple arguments
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-18 08:30:24 +00:00
svn 32fd8649d8 * 2018-09-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-18 00:22:06 +00:00
nobu eddd630047 pty.c: more difensive
* ext/pty/pty.c (chfunc): should not close the slave fd if it is 0..2.
  [ruby-core:89043] [Bug #15116]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-18 00:22:04 +00:00
svn 7c5d475d29 * 2018-09-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-17 01:31:08 +00:00
k0kubun 433c2714a1 common.mk: ruby tool/update-deps --fix
tool/update-deps: tweak the comment to make sure it should be built in
the source directory, because building ruby outside source directory
failed on my trial.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-17 01:31:06 +00:00
nobu 8b6f1beba6 Propagate subprocess timeout scale option to worker processes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-16 14:32:30 +00:00
k0kubun af0e536d03 addr2line.c: fix -Wmaybe-uninitialized
../addr2line.c: In function ‘fill_lines’:
../addr2line.c:709:8: warning: ‘file’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (file != NULL) {
        ^
../addr2line.c:535:11: warning: ‘filesize’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     off_t filesize;
           ^~~~~~~~

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-16 13:22:00 +00:00
marcandre 1a6c27346e lib/matrix: Fix potential bug of Vector#angle_with
Could happen for some linearly dependent vectors.
Patch by Vasiliy Petrov. [Fix GH-1803]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-16 04:18:50 +00:00