61788 Commits

Author SHA1 Message Date
卜部昌平
1f4db23ac1 .gdbinit: struct RHash::basic is not a pointer 2020-06-12 10:35:44 +09:00
卜部昌平
c74b044aab .gdbinit: as.heap.aux.shared no longer exist
Maybe 182ae1407b3f6597cdbf6872f788c1ed3aa22a35 missed it.
2020-06-12 10:23:15 +09:00
Jeremy Evans
a6cf2f3d22 Make mutating the result of SortedSet#to_a not affect the set
Fixes [Bug #15834]
2020-06-11 14:02:00 -07:00
Alan Wu
e100fcbdd1 Prohibit setting class variable on frozen module through inheritance
Setting class varibles goes through the ancestor list which can
contain iclasses. Iclasses share a lot of information with the
module they are made from, but not the frozen status.

Check the frozen status of the module instead of the iclass.
2020-06-11 14:46:08 -04:00
git
631c01f5ae * 2020-06-12 [ci skip] 2020-06-12 00:55:31 +09:00
Burdette Lamar
eb5ecc2ea8
Enhanced Rdoc for Array#rindex and Array#[]= (#3204)
* Enhanced Rdoc for Array#rindex and Array#[]=

* Enhanced Rdoc for Array#rindex and Array#[]=
2020-06-11 10:55:11 -05:00
Jeremy Evans
2188d6d160 Warn when passing a non-literal block to Kernel#lambda
Implements [Feature #15973]
2020-06-11 07:30:48 -07:00
Nobuyoshi Nakada
5349506eb4
Updated autogenerated dependencies
Sorted the lines asnd added mjit_build_dir.o dependencies.
2020-06-11 18:06:29 +09:00
Kazuhiro NISHIYAMA
2dd61df69f
Revert encoding to ::Encoding::UTF_8 if fu_windows? 2020-06-11 17:12:11 +09:00
Kazuhiro NISHIYAMA
59646e8e29
Fix error in remove_entry
When `LANG=C`, dir is `UTF-8` and `base` is 'ASCII-8BIT` in `FileUtils::Entry_#join`.
So `Encoding::CompatibilityError` occurred and files are not removed.

https://rubyci.org/logs/rubyci.s3.amazonaws.com/arch/ruby-master/log/20200611T060002Z.fail.html.gz
```
  1) Error:
WEBrick::TestFileHandler#test_cjk_in_path:
Errno::ENOTEMPTY: Directory not empty @ dir_s_rmdir - /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/tmp/???20200611-1887828-3nn72a
    /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:1460:in `rmdir'
    /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:1460:in `block in remove_dir1'
    /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:1471:in `platform_support'
    /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:1459:in `remove_dir1'
    /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:1452:in `remove'
    /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:780:in `block in remove_entry'
    /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:1509:in `ensure in postorder_traverse'
    /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:1509:in `postorder_traverse'
    /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/fileutils.rb:778:in `remove_entry'
    /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/lib/tmpdir.rb:97:in `mktmpdir'
    /home/chkbuild/chkbuild/tmp/build/20200611T060002Z/ruby/test/webrick/test_filehandler.rb:292:in `test_cjk_in_path'
```
2020-06-11 16:29:31 +09:00
Nobuyoshi Nakada
a6713a5758
Refined ioctl error description 2020-06-11 14:31:39 +09:00
Masataka Pocke Kuwabara
c1d1f92e8a [ruby/logger] Mention File::Null in Logger#new document
https://github.com/ruby/logger/commit/2e772770be
2020-06-11 14:22:32 +09:00
Masataka Pocke Kuwabara
c7da0fcb39 [ruby/logger] Mention behavior when logdev is a nil in the document
https://github.com/ruby/logger/commit/8dc270ee23
2020-06-11 14:22:19 +09:00
Lourens Naudé
ae93ebae67 [ruby/logger] Let Logger#reopen not raise on nil log devices
https://github.com/ruby/logger/commit/da7bf844e5
2020-06-11 13:54:04 +09:00
Lourens Naudé
f3e12caa08 [ruby/logger] Let File::NULL ("/dev/null", "NUL" etc.) be considered a nil log device
https://github.com/ruby/logger/commit/b42a1b99aa
2020-06-11 13:53:50 +09:00
Hiroshi SHIBATA
13baa2b5a5 [ruby/matrix] Drop to Ruby 2.4 and 2.5
https://github.com/ruby/matrix/commit/3244d82804
2020-06-11 13:48:17 +09:00
Kazuhiro NISHIYAMA
e698bf1a7f [ruby/webrick] Fix httpd error in CJK directory
[Bug #16753]

https://github.com/ruby/webrick/commit/83cf440858
2020-06-11 13:38:32 +09:00
John W Higgins
6742fcf553 [ruby/webrick] Extract creation of Net::HTTP in httpproxy
https://github.com/ruby/webrick/commit/e58195faf8
2020-06-11 13:37:24 +09:00
Hiroshi SHIBATA
fdd475386d
Gem::Specification#date is set automatically by RubyGems.org. 2020-06-11 13:29:06 +09:00
Hiroshi SHIBATA
3b3a9edf48
Drop to Ruby 2.4 2020-06-11 13:06:59 +09:00
Hiroshi SHIBATA
44581d98bb [ruby/net-imap] Drop to Ruby 2.4
https://github.com/ruby/net-imap/commit/c3256e3848
2020-06-11 12:39:31 +09:00
Hiroshi SHIBATA
aa8ca03f39
[ruby/delegate] Fixed superclass missmatch
https://github.com/ruby/delegate/commit/3ab3add800
2020-06-11 12:24:57 +09:00
Nobuyoshi Nakada
1fb16dbb6e
Adjusted indents [ci skip] 2020-06-11 10:20:08 +09:00
Jeremy Evans
f3e927b0cc Make proc/Proc.new without block an error instead of warning
The warning for these was added in 2.7.
2020-06-10 17:49:54 -07:00
Jean byroot Boussier
f48fce4981 Fix a typo in instance_variable_set documentation 2020-06-10 17:49:11 -07:00
Peter Zhu
0213f5b08a Fix ASan crash 2020-06-10 16:36:44 -07:00
Nobuyoshi Nakada
04fddf3573 ENV.delete should return the result of block on non-existing key
Fixes [Bug #16173]

Co-Authored-By: Burdette Lamar <burdettelamar@yahoo.com>
Co-Authored-By: Jeremy Evans <code@jeremyevans.net>
2020-06-10 12:49:27 -07:00
git
aab2a7cfce * 2020-06-11 [ci skip] 2020-06-11 02:54:05 +09:00
Jeremy Evans
573e8d7736 Change language used in instance_variable_set documentation [ci skip]
This uses less harsh language recommended by duerst.

Fixes [Misc #15265]
Fixes [Misc #15748]
2020-06-10 10:49:28 -07:00
Nobuyoshi Nakada
96d184aa49
Run spec/bundler without a sub-make 2020-06-10 23:30:13 +09:00
Nobuyoshi Nakada
73ca989a81
spec/bundler must not be run by mspec 2020-06-10 21:56:36 +09:00
Benoit Daloze
998ccb0831 [rubygems/rubygems] Use parenthesis for clarity for ternary condition
https://github.com/rubygems/rubygems/commit/d1247472b9
2020-06-10 21:33:46 +09:00
Benoit Daloze
b62e9c912d [rubygems/rubygems] Increase timeouts in test_gem_stream_ui.rb
* 0.1s is really short and fails in CI: #3622
https://github.com/rubygems/rubygems/commit/d8495ae1c1
2020-06-10 21:33:14 +09:00
Burdette Lamar
8d4b259408
Enhanced Rdoc for Array#fetch and Array#index (#3202)
* Enhanced Rdoc for Array#fetch and Array#index
* Couple of tweaks (per review) in Rdoc for Hash
2020-06-10 06:45:29 -05:00
Nobuyoshi Nakada
21df4dce53
Skip updating exts in test-all to reduce the turnaround time 2020-06-10 19:42:27 +09:00
卜部昌平
5648976c3c vm_call_method: avoid marking on-stack object
This callcache is on stack, must not be GCed.  However its contents are
copied from other materials, which can be an ordinal object.  Should
set a flag to make sure it is properly skipped by the GC.
2020-06-10 10:22:39 +09:00
Yusuke Endoh
8bee9e5cd5 doc/contributing.rdoc: Now ruby >= 2.2 or 2.3 is required to build ruby 2020-06-10 09:52:54 +09:00
Hiroshi SHIBATA
41b8866e75
This document is steal status.
Now, You can see the all of contributors at https://github.com/ruby/ruby/graphs/contributors
2020-06-10 09:29:37 +09:00
Jeremy Evans
ad0eccf840
Work around infinite loop when overriding method visibility in prepended module (#3201)
For ZSUPER methods with no defined class for the method entry, start the next lookup at the superclass of the origin class of the method owner, instead of the superclass of the method owner.

Fixes [Bug #16942]
2020-06-09 16:30:55 -07:00
Nobuyoshi Nakada
9491bd89da
Reduced job number to run tests on MinGW
It seems too heavy as fails more often than before.
2020-06-10 06:32:36 +09:00
Aaron Patterson
62ce8f96cd
Revert "Combine sweeping and moving"
This reverts commit 02b216e5a70235f42f537e895d6f1afd05d8916a.
This reverts commit 9b8825b6f94696c9659f93f5da9bf02644625f67.

I found that combining sweep and move is not safe.  I don't think that
we can do compaction concurrently with _anything_ unless there is a read
barrier installed.

Here is a simple example.  A class object is freed, and during it's free
step, it tries to remove itself from its parent's subclass list.
However, during the sweep step, the parent class was moved and the
"currently being freed" class didn't have references updated yet.  So we
get a segv like this:

```
(lldb) bt
* thread #1, name = 'ruby', stop reason = signal SIGSEGV
  * frame #0: 0x0000560763e344cb ruby`rb_st_lookup at st.c:320:43
    frame #1: 0x0000560763e344cb ruby`rb_st_lookup(tab=0x2f7469672f6e6f72, key=3809, value=0x0000560765bf2270) at st.c:1010
    frame #2: 0x0000560763e8f16a ruby`rb_search_class_path at variable.c:99:9
    frame #3: 0x0000560763e8f141 ruby`rb_search_class_path at variable.c:145
    frame #4: 0x0000560763e8f141 ruby`rb_search_class_path(klass=94589785585880) at variable.c:191
    frame #5: 0x0000560763ec744e ruby`rb_vm_bugreport at vm_dump.c:996:17
    frame #6: 0x0000560763f5b958 ruby`rb_bug_for_fatal_signal at error.c:675:5
    frame #7: 0x0000560763e27dad ruby`sigsegv(sig=<unavailable>, info=<unavailable>, ctx=<unavailable>) at signal.c:955:5
    frame #8: 0x00007f8b891d33c0 libpthread.so.0`___lldb_unnamed_symbol1$$libpthread.so.0 + 1
    frame #9: 0x0000560763efa8bb ruby`rb_class_remove_from_super_subclasses(klass=94589790314280) at class.c:93:56
    frame #10: 0x0000560763d10cb7 ruby`gc_sweep_step at gc.c:2674:2
    frame #11: 0x0000560763d1187b ruby`gc_sweep at gc.c:4540:2
    frame #12: 0x0000560763d101f0 ruby`gc_start at gc.c:6797:6
    frame #13: 0x0000560763d15153 ruby`rb_gc_compact at gc.c:7479:12
    frame #14: 0x0000560763eb4eb8 ruby`vm_exec_core at vm_insnhelper.c:5183:13
    frame #15: 0x0000560763ea9bae ruby`rb_vm_exec at vm.c:1953:22
    frame #16: 0x0000560763eac08d ruby`rb_yield at vm.c:1132:9
    frame #17: 0x0000560763edb4f2 ruby`rb_ary_collect at array.c:3186:9
    frame #18: 0x0000560763e9ee15 ruby`vm_call_cfunc_with_frame at vm_insnhelper.c:2575:12
    frame #19: 0x0000560763eb2e66 ruby`vm_exec_core at vm_insnhelper.c:4177:11
    frame #20: 0x0000560763ea9bae ruby`rb_vm_exec at vm.c:1953:22
    frame #21: 0x0000560763eac08d ruby`rb_yield at vm.c:1132:9
    frame #22: 0x0000560763edb4f2 ruby`rb_ary_collect at array.c:3186:9
    frame #23: 0x0000560763e9ee15 ruby`vm_call_cfunc_with_frame at vm_insnhelper.c:2575:12
    frame #24: 0x0000560763eb2e66 ruby`vm_exec_core at vm_insnhelper.c:4177:11
    frame #25: 0x0000560763ea9bae ruby`rb_vm_exec at vm.c:1953:22
    frame #26: 0x0000560763ceee01 ruby`rb_ec_exec_node(ec=0x0000560765afa530, n=0x0000560765b088e0) at eval.c:296:2
    frame #27: 0x0000560763cf3b7b ruby`ruby_run_node(n=0x0000560765b088e0) at eval.c:354:12
    frame #28: 0x0000560763cee4a3 ruby`main(argc=<unavailable>, argv=<unavailable>) at main.c:50:9
    frame #29: 0x00007f8b88e560b3 libc.so.6`__libc_start_main + 243
    frame #30: 0x0000560763cee4ee ruby`_start + 46
(lldb) f 9
frame #9: 0x0000560763efa8bb ruby`rb_class_remove_from_super_subclasses(klass=94589790314280) at class.c:93:56
   90
   91  		*RCLASS_EXT(klass)->parent_subclasses = entry->next;
   92  		if (entry->next) {
-> 93  		    RCLASS_EXT(entry->next->klass)->parent_subclasses = RCLASS_EXT(klass)->parent_subclasses;
   94  		}
   95  		xfree(entry);
   96  	    }
(lldb) command script import -r misc/lldb_cruby.py
lldb scripts for ruby has been installed.
(lldb) rp entry->next->klass
(struct RMoved) $1 = (flags = 30, destination = 94589792806680, next = 94589784369160)
(lldb)
```
2020-06-09 13:53:18 -07:00
Burdette Lamar
b85b866300
Enhanced Rdoc for Array (#3193)
Methods:

    #freeze
    #<<
    #push
    #pop
    #shift
    #unshift
    #slice
    #at
    #first
    #last
2020-06-09 13:57:41 -05:00
git
6c5cdc88b0 * 2020-06-10 [ci skip] 2020-06-10 02:45:32 +09:00
Aaron Patterson
2ba2b32d9e
Freeing cc tables doesn't need access to ID
We don't need to resolve symbols when freeing cc tables, so this commit
just changes the id table iterator to look at values rather than keys
and values.
2020-06-09 10:44:52 -07:00
Hiroshi SHIBATA
7f3efee102
the default gems couldn't use ruby2_keywords gem.
We avoid to use the current delegate library under the Ruby 2.7.
2020-06-09 22:51:54 +09:00
Nobuyoshi Nakada
cbb9935fc4
Use the dedicated conversion macro 2020-06-09 22:25:46 +09:00
Nobuyoshi Nakada
101d56ddca
Improved assertions 2020-06-09 21:42:25 +09:00
Hiroshi SHIBATA
c8cd6b2003
Added ruby2_keywords for Ruby 2.6 and 2.5 2020-06-09 21:30:36 +09:00
pavel
31419f46fc [ruby/fcntl] add F_GETPIPE_SZ and F_SETPIPE_SZ
https://github.com/ruby/fcntl/commit/39e0faedc5
2020-06-09 21:13:34 +09:00
Hiroshi SHIBATA
bee63ab97a
[ruby/fcntl] Use Gemfile instead of Gem::Specification#add_development_dependency. 2020-06-09 21:11:32 +09:00