Commit graph

64552 commits

Author SHA1 Message Date
Burdette Lamar
139839b805
[ci skip] Enhanced Rdoc for Hash (#3143)
* Enhanced Rdoc for Hash

* Respond to review

* Nudge CI testing.
Respond to review
2020-05-27 09:31:22 -05:00
Takashi Kokubun
083a17a82a
Carve out mjit_exec_slowpath
and mark it as COLDFUN on JIT, assuming enqueue usually happens on VM.
2020-05-27 01:41:04 -07:00
Masataka Pocke Kuwabara
a3f498e44c
Fix max, min, minmax documentation (#3131)
They only need that all objects implement <=>,
but the documentation said it needs Comparable.
2020-05-26 23:48:46 -07:00
Masataka Pocke Kuwabara
752041ca11
Update Enumerable::Yielder#to_proc document (#3142) 2020-05-26 23:46:42 -07:00
Masataka Pocke Kuwabara
64c5bf5721
Fix non-existent method reference in Enumerator.produce document (#3141) 2020-05-26 23:37:05 -07:00
Takashi Kokubun
9d71373c23
Mark vm_stackoverflow as NOINLINE COLDFUNC on JIT
to reduce code size and improve locality of hot code.
2020-05-26 23:24:58 -07:00
Takashi Kokubun
61b14bb32b
Eliminate a call instruction on JIT cancel path
by calling combined functions specialized for each cancel type.

I'm hoping to improve locality of hot code, but this patch's impact should
be insignificant.
2020-05-26 23:01:52 -07:00
Nobuyoshi Nakada
4cabd77e33
Removed a trailing space [ci skip] 2020-05-27 14:30:45 +09:00
Nobuyoshi Nakada
0f8b5819b3
Merged recipes for the same target 2020-05-27 13:13:12 +09:00
Nobuyoshi Nakada
51fa4c9f49
Removed obsolete forwarding DLL recipe
It has never been created by default, and no reason to keep binary
compatibility against extension libraries for ruby 1.8.

1. `LIBRUBY_SO` on Cygwin was named originally.

   - 94089e82a1:: `$(RUBY_INSTALL_NAME)-cygwin.dll`
   - f0ba57341a:: `$(RUBY_INSTALL_NAME).cygwin.dll`
   - c74a3b21f5:: `cygwin-$(RUBY_INSTALL_NAME)-$(MAJOR).$(MINOR).dll`

2. And then renamed to be net distribution compliant.

   - 6f059f33ef:: `cyg$(RUBY_SO_NAME)$(MAJOR)$(MINOR).dll`

3. Next at 430eabfe13, forwarding DLL was added for binary
   compatibility against extension libraries.
2020-05-27 12:40:18 +09:00
S-H-GAMELINKS
0fcb2dd51d
add static modifier for rb_str_ord func 2020-05-27 11:26:44 +09:00
Jeremy Evans
e0b40ef5d8 Don't convert bundler man pages from mdoc to man
These man pages are already in man format and assuming they are
mdoc format breaks things.

Fixes [Bug #16823]
2020-05-27 07:47:50 +09:00
Yusuke Endoh
962c302a1a test/drb/test_drbssl.rb: skip LeakChecker as openssl keeps /dev/random
and /dev/urandom intentionally.  OpenSSL::PKey::RSA.new opens the two
random generators and keeps the file descriptors.

93f99b681a/crypto/rand/rand_unix.c (L674)

They are detected by the LeakChecker as fd leak, but it is intentional.

20200526T160005Z.log.html.gz
```
[  597/20199] DRbTests::TestDRbSSLAry#test_01 = 0.29 s
Leaked file descriptor: DRbTests::TestDRbSSLAry#test_01: 8 #<File::Stat dev=0x6, ino=11, mode=020666, nlink=1, uid=0, gid=0, rdev=0x109, size=0, blksize=4096, blocks=0, atime=2020-05-23 14:45:13.751999995 +0000, mtime=2020-05-23 14:45:13.751999995 +0000, ctime=2020-05-23 14:45:13.751999995 +0000>
Leaked file descriptor: DRbTests::TestDRbSSLAry#test_01: 9 #<File::Stat dev=0x6, ino=10, mode=020666, nlink=1, uid=0, gid=0, rdev=0x108, size=0, blksize=4096, blocks=0, atime=2020-05-23 14:45:13.755999995 +0000, mtime=2020-05-23 14:45:13.755999995 +0000, ctime=2020-05-23 14:45:13.755999995 +0000>
```
2020-05-27 02:07:38 +09:00
Nobuyoshi Nakada
135c6a4b99
fiddle: need to update configure after updating config tools 2020-05-27 00:30:59 +09:00
git
f8e703e2b0 * 2020-05-27 [ci skip] 2020-05-27 00:28:32 +09:00
Yusuke Endoh
5429deb075 lib/open3.rb: make sure that pipes are closed
Attempting to invoke a non-existent command led to the leak of fds.

20200526T140004Z.log.html.gz
```
[ 9101/20195] TestGemExtCmakeBuilder#test_self_build = 0.01 sLeaked file descriptor: TestGemExtCmakeBuilder#test_self_build: 7 : #<IO:fd 7>
Leaked file descriptor: TestGemExtCmakeBuilder#test_self_build: 10 : #<IO:fd 10>
Leaked file descriptor: TestGemExtCmakeBuilder#test_self_build: 11 : #<IO:fd 11>
Leaked file descriptor: TestGemExtCmakeBuilder#test_self_build: 12 : #<IO:fd 12>
```
2020-05-27 00:20:14 +09:00
Koichi Sasada
eb20d2f449 include debug option in slack notification 2020-05-26 23:20:36 +09:00
Koichi Sasada
a809caa4b3 remove duplication. 2020-05-26 23:10:35 +09:00
Koichi Sasada
68e987c315
GH actions with RUBY_DEBUG (#3144)
Add GH actions with -DRUBY_DEBUG
2020-05-26 23:04:10 +09:00
Nobuyoshi Nakada
5917fe2303
_GNU_SOURCE is needed for mkostemp on Cygwin 2020-05-26 19:17:47 +09:00
Nobuyoshi Nakada
17d17de0e8
Get rid of redefinition of memcpy on mingw 2020-05-26 16:58:40 +09:00
Nobuyoshi Nakada
04eb05a8e0
Prefer configured printf format for mingw gcc 10 2020-05-26 16:58:28 +09:00
Nobuyoshi Nakada
d63bba1e24
[DOC] Use note-list to pretend original plain-text looks [ci skip] 2020-05-26 15:14:55 +09:00
Nobuyoshi Nakada
7d5da30c9e
Test for [Feature #16832] 2020-05-26 15:09:07 +09:00
Jean Boussier
385ac07fd8 Use receiver #name rather than #inspect to build NameError message 2020-05-26 14:10:33 +09:00
Jeremy Evans
4e1f2283b4 Make Thread#thread_variable? similar to #thread_variable_get
Don't use rb_check_id, which only works for pinned symbols.
Switch inadvertent creation test for thread_variable? to
only check for pinned symbols, same as thread_variable_get
and thread_variable_set.

Make key variable name in thread_local_set match
thread_local_get and thread_variable?.

Fixes [Bug #16906]
2020-05-25 21:38:35 -07:00
Jeremy Evans
faab5cbeb7 Fix documentation for Fiber#raise [ci skip]
Fixes [Bug #16912]
2020-05-25 19:46:12 -07:00
Koichi Sasada
c9fe4ebd29 cause SEGV for the test.
21991e6ca5 enables `__builtin_assume()` for clang and it seems
skip SEGV on rb_class_of() with unexpected value. This test expects
a [BUG] output, so this patch causes [BUG] to show [BUG] message.

707088232 (step):12:230
```
  1) Failure:
TestVMDump#test_darwin_invalid_access [/Users/runner/runners/2.262.1/work/ruby/ruby/src/test/ruby/test_vm_dump.rb:19]:
pid 43128 exit 0.

1. [2/2] Assertion for "stderr"
   | Expected /^\[IMPORTANT\]/ to match "".
```
2020-05-26 04:49:11 +09:00
git
7bafc9f433 * 2020-05-26 [ci skip] 2020-05-26 03:21:39 +09:00
Koichi Sasada
4ac42874bc Update include/ruby/assert.h
Co-authored-by: 卜部昌平 <shyouhei@ruby-lang.org>
2020-05-26 03:21:14 +09:00
Koichi Sasada
21991e6ca5 Use RUBY_DEBUG instead of NDEBUG
Assertions in header files slows down an interpreter, so they should be
turned off by default (simple `make`). To enable them, define a macro
`RUBY_DEBUG=1` (e.g. `make cppflags=-DRUBY_DEBUG` or use `#define` at
the very beggining of the file. Note that even if `NDEBUG=1` is defined,
`RUBY_DEBUG=1` enables all assertions.
[Feature #16837]
related: https://github.com/ruby/ruby/pull/3120

`assert()` lines in MRI *.c is not disabled even if `RUBY_DEBUG=0` and
it can be disabled with `NDEBUG=1`. So please consider to use
`RUBY_ASSERT()` if you want to disable them when `RUBY_DEBUG=0`.
2020-05-26 03:21:14 +09:00
Kazuhiro NISHIYAMA
b10b37924a
Fix failures in ./spec/bundler/quality_spec.rb
```
Failures:

  1) The library itself does not contain any warnings
     Failure/Error: raise "Invoking #{method}!(#{args.map(&:inspect).join(", ")}) failed:\n#{last_command.stdboth}"

     RuntimeError:
       Invoking sys_exec!("ruby -w") failed:
       /home/user/snapshot-master/lib/bundler/cli/add.rb:4:in `<module:Bundler>': uninitialized constant Bundler::CLI (NameError)
        from /home/user/snapshot-master/lib/bundler/cli/add.rb:3:in `<top (required)>'
        from /home/user/snapshot-master/lib/rubygems/core_ext/kernel_require.rb:91:in `require'
        from /home/user/snapshot-master/lib/rubygems/core_ext/kernel_require.rb:91:in `require'
        from -:2:in `<main>'

       Commands:
       $ ruby -w
       /home/user/snapshot-master/lib/bundler/cli/add.rb:4:in `<module:Bundler>': uninitialized constant Bundler::CLI (NameError)
        from /home/user/snapshot-master/lib/bundler/cli/add.rb:3:in `<top (required)>'
        from /home/user/snapshot-master/lib/rubygems/core_ext/kernel_require.rb:91:in `require'
        from /home/user/snapshot-master/lib/rubygems/core_ext/kernel_require.rb:91:in `require'
        from -:2:in `<main>'
       # $? => 1
```
2020-05-25 20:12:41 +09:00
Kazuhiro NISHIYAMA
fcc8be0198
Fix a failure in bundle version with version outputs the version with build metadata
```
  1) bundle version with version outputs the version with build metadata
     Failure/Error: expect(out).to match(/\ABundler version #{Regexp.escape(Bundler::VERSION)} \(\d{4}-\d{2}-\d{2} commit #{COMMIT_HASH}\)\z/)

       expected "Bundler version 2.2.0.dev (2020-05-25 commit )" to match /\ABundler version 2\.2\.0\.dev \(\d{4}-\d{2}-\d{2} commit (?-mix:unknown|[a-fA-F0-9]{7,})\)\z/
       Diff:
       @@ -1,2 +1,2 @@
       -/\ABundler version 2\.2\.0\.dev \(\d{4}-\d{2}-\d{2} commit (?-mix:unknown|[a-fA-F0-9]{7,})\)\z/
       +"Bundler version 2.2.0.dev (2020-05-25 commit )"

       Commands:
       $ /home/user/snapshot-master/ruby -I/home/user/snapshot-master/spec/bundler -r/home/user/snapshot-master/spec/bundler/support/artifice/fail.rb -r/home/user/snapshot-master/spec/bundler/support/hax.rb /home/user/snapshot-master/tmp/1/gems/system/bin/bundle version
       Bundler version 2.2.0.dev (2020-05-25 commit )
       # $? => 0
```
2020-05-25 20:08:30 +09:00
Kazuhiro NISHIYAMA
67d2a715ca
Fix a error in a before(:suite) hook
703745101 (step):16:27
```
An error occurred in a `before(:suite)` hook.
Failure/Error: contents = File.read(version_file)

Errno::ENOENT:
  No such file or directory @ rb_sysopen - /home/runner/work/actions/actions/snapshot-master/tmp/1/bundler-2.2.0.dev/lib/bundler/version.rb
```
2020-05-25 20:08:30 +09:00
Hiroshi SHIBATA
45ffab365d
Added entries about RubyGems and Bundler 2020-05-25 15:20:39 +09:00
Nobuyoshi Nakada
2225aa987f
[DOC] Turned note-lists into label-lists [ci skip] 2020-05-25 11:02:08 +09:00
git
089dcfbf60 * 2020-05-25 [ci skip] 2020-05-25 10:19:22 +09:00
卜部昌平
06321ea26c RBIMPL_ATTR_DEPRECATED: disable for GCC10
GCC 10.x seems buggy here.  See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95302
2020-05-25 10:17:51 +09:00
aycabta
c6c023317c [ruby/rdoc] Check uninitialized instance variable in test
3dcd5ddbb6
2020-05-24 23:47:24 +09:00
David Rodríguez
3169ffc0d6 [ruby/rdoc] Add frozen string literal support
daac9d0471
2020-05-24 23:47:24 +09:00
aycabta
37b8a7afca [ruby/rdoc] Add instance_methods because instance_method_list should be obsolete
9b1da32254
2020-05-24 23:47:24 +09:00
Nobuyoshi Nakada
e6d1363ae6 [ruby/rdoc] Fixed inverted CSS for note-list and label-list
a13d6439da
2020-05-24 23:47:24 +09:00
aycabta
32e0ff26e0 [ruby/rdoc] Delegate ERB args correctly
82ff37a822
2020-05-24 23:47:24 +09:00
Jeremy Evans
7e7981c84f [ruby/rdoc] Treat multiple Ruby methods calling the same C method as aliases
Previously, only calls to rb_define_alias were treated as aliases.
This treats calls to rb_define_method with the same C function as
aliases, with the first function defined being the primary method.

This move the dedup code from the C parser to AnyMethod, and has
AnyMethod look in its aliases to find the call_seq.

Switch the deduplication code to remove lines matching one of the
other aliases, instead of only keeping lines matching the current
alias.  The previous approach could eliminate all call_seq lines
in cases where no line matched.  This was necessary to pass
tests when call_seq does deduplication by default.

The only change to the darkfish template is to not perform
unnecessary work by deduplicating twice.

0ead78616b
2020-05-24 23:47:24 +09:00
aycabta
f52a4690f8 [ruby/rdoc] Process crossref before tidylink
The crossref must be linked before tidylink because Klass.method[:sym] will be
processed as a tidylink first and will be broken.

0f47baf6d2
2020-05-24 23:47:24 +09:00
Nate Matykiewicz
c79f9ea606 [ruby/rdoc] Escape method names in HTML
The following is invalid HTML:
<a href="Array.html#method-i-3C-3C"><code><<</code></a></p>

Incorrect:
<code><<</code>

Correct:
<code>&lt;&lt;</code>

Fixes #761

b120d087f6
2020-05-24 23:47:24 +09:00
Nobuyoshi Nakada
b10c9d2012
[DOC] Added document for rb_check_symbol() [ci skip] 2020-05-24 10:53:12 +09:00
Burdette Lamar
8b8b7c7876
Enhanced Rdoc for Hash (#3139) 2020-05-23 20:35:05 -05:00
git
0b161774d9 * 2020-05-24 [ci skip] 2020-05-24 04:01:38 +09:00
Yusuke Endoh
f27e0d90c8 ext/fiddle/fiddle.gemspec: avoid require lib/fiddle/version.rb
It loads `ext/fiddle/lib/fiddle/version.rb`, which causes constant
redefinition warning:

20200523T153003Z.log.html.gz
```
[ 6317/20193] TestDefaultGems#test_validate_gemspec/home/chkbuild/chkbuild/tmp/build/20200523T153003Z/ruby/ext/fiddle/lib/fiddle/version.rb:2: warning: already initialized constant Fiddle::VERSION
/home/chkbuild/chkbuild/tmp/build/20200523T153003Z/ruby/.ext/common/fiddle/version.rb:2: warning: previous definition of VERSION was here
 = 0.16 s
```

This changeset read the version by manual parsing hack which is also
used in stringio and zlib.
2020-05-24 04:01:20 +09:00