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

52065 Коммитов

Автор SHA1 Сообщение Дата
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
svn 2492402249 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-16 04:00:16 +00:00
marcandre c22b853737 Alias Struct#select as Struct#filter. Patch by Kenichi Kamiya.
[Fix GH-#1862] [#1784]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-16 04:00:14 +00:00
marcandre 2b3982ad1c node.c: Typo fix. Patch by Shuichi Tamayose. [ci skip] [Fix GH-1880]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-16 03:24:15 +00:00
marcandre 2521b079fa [DOC] Improve String#strip documentation.
Patch by Josh Goldberg. [Fix GH-1933] [ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-16 02:49:44 +00:00
marcandre 18fe495902 Add some missing documentation to Queue#{close|deq} [ci skip]
Patch by Lars Kanis. [Fix GH-1949]

*  Describe the impact of Queue#close to Queue#deq .

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-16 02:45:16 +00:00
marcandre 4452e857d4 array.c: Optimize rb_ary_and. Patch by Stefan Schüßler. [Fix GH-1938]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-16 02:42:26 +00:00
svn 4e62527c33 * 2018-09-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-15 16:27:07 +00:00
nobu e040465153 encoding.c: check external encoding
* encoding.c (rb_enc_get_index): external encoding may not be Data
  object.  [ruby-core:89016] [Bug #15122]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-15 16:27:06 +00:00
nobu 97f8d0fb9e Work on Benchmark::Tms documentation [ci skip]
[ruby-core:88874] [Bug #15080]

From: Richard Wardin <shalmezad@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-15 12:45:46 +00:00
nobu 0d7facee42 get rid of newer syntax for old versions
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-15 11:45:31 +00:00
nobu 893949167b Fix issues detected by code analysis tool (mainly Coverity).
* Fix leaked storage in addr2line.c.
* Fix for "top_root" leaking the resource.

[Fix GH-1956]

From: Jun Aruga <jaruga@redhat.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-15 09:59:14 +00:00
nobu 958817d50d Expand spec files to realpaths
* spec/mspec/lib/mspec/utils/script.rb (MSpecScript#entries): expand
  the given spec path to the realpath, not to require a library by
  realpath and symbolic link path from the spec file.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-15 09:48:42 +00:00
nobu 257d00223d rid of warnings [Fix GH-1953]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-15 09:25:31 +00:00
nobu aafeb4b724 test_sprintf.rb: test for %p
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-15 08:39:07 +00:00
svn 0279a90c73 * 2018-09-15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-15 02:20:48 +00:00
nobu 9580586b63 Use opt_{aref,aset} over opt_{aref,aset}_with
* compile.c (iseq_compile_each0): Use `opt_aref`/`opt_aset` over
  `opt_aref_with`/`opt_aset_with` when frozen_string_literal: true,
  not to resurrect the index string on non-Hash receiver.

[Fix GH-1957]

From: chopraanmol1 <chopraanmol1@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-15 02:20:47 +00:00
svn fa457e65fe * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-14 13:19:46 +00:00