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

70108 Коммитов

Автор SHA1 Сообщение Дата
YO4 66e14e2076 [ruby/reline] follow consolemode change
fix 'https://github.com/ruby/reline/issues/300'

https://github.com/ruby/reline/commit/b2cc6805a8
2021-12-10 22:15:56 +09:00
Kevin Logan eb2d3c19fe [rubygems/rubygems] Properly fetch Gem#latest_spec_for with multiple sources
https://github.com/rubygems/rubygems/commit/a93ec63df3
2021-12-10 20:54:29 +09:00
David Rodríguez 0e60bc118b [rubygems/rubygems] Ignore dependencies not actually locked from frozen check
Only needed if there can be no explicit global source (bundler < 3).

https://github.com/rubygems/rubygems/commit/73923f4af5
2021-12-10 19:09:55 +09:00
Nobuyoshi Nakada 30268d1de6
Prefer flat_map 2021-12-10 18:39:48 +09:00
Nobuyoshi Nakada a5baf8d6bc
Revert zero-check for alloca
Something weird results in int-in-bool-context and
stringop-overflow warnings.
2021-12-10 18:39:48 +09:00
Yuta Saito 787daea6d2 Allow configuring TRANSIENT_HEAP_TOTAL_SIZE
Some platforms have memory resource limits, but theap's memory area is
too large for such situations. So allow configuring the size at
build-time.
2021-12-10 17:15:17 +09:00
git 0cefc2fbdf Update bundled_gems at 2021-12-10 2021-12-10 07:01:36 +00:00
Kazuhiro NISHIYAMA 21749f7be3
Update stdlib versions [ci skip] 2021-12-10 14:55:03 +09:00
Jeremy Evans 2727815068 Add {Method,UnboundMethod}#{public?,private?,protected?}
These methods allow for checking whether the method has that
visibility.

Implements [Feature #11689]
2021-12-09 12:59:37 -08:00
Alan Wu 74159f7f3e
[DOC] Stop mentioning Qfalse==0 for C extensions
See [Feature #18397] for detail. Follow up for
b859397e1b.

[ci skip]

Co-authored-by: Koichi Sasada <ko1@atdot.net>
2021-12-09 13:38:20 -05:00
Jemma Issroff b859397e1b
[DOC] Stop recommending Qfalse==0 assumption to C extensions
Encourage use of RTEST(), direct Qfalse comparison, and remove references to
Qfalse == 0 in extension documentation.

See [Bug #18397] for detail.
[ci skip]
2021-12-09 11:23:51 -05:00
Nobuyoshi Nakada bcc2bb28b0 Fix stack buffer overflow
https://hackerone.com/reports/1306859
2021-12-10 01:04:59 +09:00
Koichi Sasada 9873af0b1a `TracePoint.allow_reentry`
In general, while TracePoint callback is running,
other registerred callbacks are not called to avoid
confusion by reentrace.
This method allow the reentrace. This method should be
used carefully, otherwize the callback can be easily called
infinitely.

[Feature #15912]

Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
2021-12-10 00:56:25 +09:00
git 88c804a6e7 * 2021-12-10 [ci skip] 2021-12-10 00:33:46 +09:00
Nobuyoshi Nakada da652e1827
Check month overflow when marshal
https://hackerone.com/reports/1244185
2021-12-09 21:51:39 +09:00
Nobuyoshi Nakada 12a0a89e22 [ruby/securerandom] Split Random::Formatter from SecureRandom [Feature #18190]
https://github.com/ruby/securerandom/commit/1e57277b9e
2021-12-09 20:26:44 +09:00
Hiroshi SHIBATA 4258c8df86
Fixed filename for Open3::VERSION 2021-12-09 19:48:22 +09:00
Hiroshi SHIBATA b06e37e242
Followed up f5d80c26d4 for sync_default_gems.rb 2021-12-09 19:33:47 +09:00
Hiroshi SHIBATA d74fe2061d
Adjust gemspec location of default gems 2021-12-09 19:28:55 +09:00
Hiroshi SHIBATA f5d80c26d4
Removed JRuby specific helper for open3 2021-12-09 19:28:54 +09:00
Charles Oliver Nutter 080169147e
[ruby/open3] Use RbConfig's 'host_os'
RUBY_PLATFORM on JRuby is always 'java' so it does not indicate
the host OS.

https://github.com/ruby/open3/commit/d2308040e6
2021-12-09 19:28:54 +09:00
Charles Oliver Nutter eb06b37c46
[ruby/open3] Update to match JRuby 9.4
This allows the wrapper functions in the main open3 to be defined
while using our ProcessBuilder logic for the internal popen
implementation.

Note this adds logic to reject redirects from a numeric fd to a
live IO object (or not a String or to_path object) since we cannot
support direct IO redirects with ProcesBuilder.

This patch allows tests to complete with the ProcessBuilder impl.
Only three tests fail:

* test_numeric_file_descriptor2 and test_numeric_file_descriptor2
  fail due to redirecting streams to a pipe IO.
* test_pid fails expecting a real PID which we cannot provide via
  ProcessBuilder.

https://github.com/ruby/open3/commit/73f986c233
2021-12-09 19:28:54 +09:00
Charles Oliver Nutter 01febcab3e
[ruby/open3] Add JRuby's Windows (JDK non-native) Open3 support
This adds JRuby's logic used on platforms where we do not have
native access to posix_spawn and related posix functions needed
to do fully-native subprocess launching and management. The code
here instead uses the JDK ProcessBuilder logic to simulate most
of the Open3 functionality.

This code does not pass all tests, currently, but provides most of
the key functionality on pure-Java (i.e. no native FFI) platforms.

https://github.com/ruby/open3/commit/689da19c42
2021-12-09 19:28:54 +09:00
Charles Oliver Nutter 34ebd13923
[ruby/open3] Only use JITSupport on CRuby
Fixes #2

https://github.com/ruby/open3/commit/6b7ede69e8
2021-12-09 19:28:54 +09:00
Olle Jonsson d150b8d06f
[ruby/open-uri] gemspec: This gem exposes 0 executables
This just makes that fact more explicit.

https://github.com/ruby/open-uri/commit/ffbfba5d69
2021-12-09 19:28:54 +09:00
Hiroshi SHIBATA c41751f10e
[ruby/io-wait] Bump up 0.2.1
https://github.com/ruby/io-wait/commit/c97ab9a212
2021-12-09 19:28:54 +09:00
Olle Jonsson dd8b9c1d03
[ruby/English] gemspec: Remove unused "executables" configuration
This gem exposes no executables.

https://github.com/ruby/English/commit/bb1ce0af20
2021-12-09 19:28:53 +09:00
aycabta 6ff9fcdfa8 [ruby/rdoc] Support addition Object class when adding methods to top level
https://github.com/ruby/rdoc/commit/23747b4950
2021-12-09 18:16:06 +09:00
aycabta 2e50989ad3 [ruby/rdoc] Resolve class and method of the same name correctly
https://github.com/ruby/rdoc/commit/1e16284fe5
2021-12-09 18:16:05 +09:00
aycabta fa806cf233 Fix typo of namespace 2021-12-09 18:15:52 +09:00
Koichi Sasada cce331272b `Ractor.make_shareable` checks proc's sefl
`Ractor.make_shareable(proc_obj)` raises an `IsolationError`
if the self of `proc_obj` is not a shareable object.

[Bug #18243]
2021-12-09 16:20:04 +09:00
Akihiro Sada c5f68a9a24
Fix typo in NEWS-2.5.0 [ci skip] 2021-12-09 12:28:42 +09:00
David Rodríguez 45c5794d32 [rubygems/rubygems] Don't load system rubygems during tests
Since tests are about testing our development copy of rubygems, not
whatever is installed in the system.

https://github.com/rubygems/rubygems/commit/f5e0b68cdd
2021-12-09 08:58:25 +09:00
Alan Wu 82bb9cedd3 YJIT: Fix leak in compilation loop
Previously, when there are too many blocks in a batch, the last block in
the batch is not tracked in the array of batches and not freed.
2021-12-08 16:59:52 -05:00
Marc-André Lafortune c47e821b89 [ruby/ostruct] Bump version to 0.5.2 2021-12-08 14:47:46 -05:00
Koichi Sasada 9c26931635 [ruby/ostruct] `Proc`'s self should be shareable.
To fix the issue https://bugs.ruby-lang.org/issues/18243
we need to make sure the Proc's self is shareable.
These procs are used by `define_method` and it doesn't use
Proc's self, so `nil` is enough.
2021-12-08 14:47:46 -05:00
Burdette Lamar 9a2ecddf32
Enhanced RDoc for String (#5227)
Treats:

    #replace
    #clear
    #chr
    #getbyte
    #setbyte
    #byteslice
    #reverse
    #reverse!
    #include?
2021-12-08 12:29:56 -06:00
git 1966dc7a5d * 2021-12-09 [ci skip] 2021-12-09 00:30:36 +09:00
Yusuke Endoh 17e7219679 ext/ripper/lib/ripper/lexer.rb: Do not deprecate Ripper::Lexer::State#[]
The old code of IRB still uses this method. The warning is noisy on
rails console.
In principle, Ruby 3.1 deprecates nothing, so let's avoid the
deprecation for the while.
I think It is not so hard to continue to maintain it as it is a trivial
shim.

https://github.com/ruby/ruby/pull/5093
2021-12-09 00:30:17 +09:00
Nobuyoshi Nakada 3021c3cedc Add `to_f` to predefined conversion method name to ID table 2021-12-08 19:11:02 +09:00
Nobuyoshi Nakada 454b4da763
[DOC] Integer.try_convert [ci skip] 2021-12-08 17:59:16 +09:00
Kazuhiro NISHIYAMA af6e088357
Skip bind port 1 when ip_unprivileged_port_start<=1
Linux can allow to bind port 1 to user.
And `ip_unprivileged_port_start` is 0 on [lima](https://github.com/lima-vm/lima) default vm.

```
1)
Socket#bind on SOCK_DGRAM socket raises Errno::EACCES when the current user does not have permission to bind FAILED
Expected Errno::EACCES but no exception was raised (0 was returned)
.../ruby/spec/ruby/library/socket/socket/bind_spec.rb:38:in `block (4 levels) in <top (required)>'
.../ruby/spec/ruby/library/socket/socket/bind_spec.rb:4:in `<top (required)>'

2)
Socket#bind on SOCK_STREAM socket raises Errno::EACCES when the current user does not have permission to bind FAILED
Expected Errno::EACCES but no exception was raised (0 was returned)
.../ruby/spec/ruby/library/socket/socket/bind_spec.rb:79:in `block (4 levels) in <top (required)>'
.../ruby/spec/ruby/library/socket/socket/bind_spec.rb:44:in `<top (required)>'

3)
Socket#bind using IPv4 using a packed socket address raises Errno::EACCES when the user is not allowed to bind to the port FAILED
Expected Errno::EACCES but no exception was raised (0 was returned)
.../ruby/spec/ruby/library/socket/socket/bind_spec.rb:119:in `block (6 levels) in <top (required)>'
.../ruby/spec/ruby/library/socket/socket/bind_spec.rb:85:in `<top (required)>'

4)
Socket#bind using IPv6 using a packed socket address raises Errno::EACCES when the user is not allowed to bind to the port FAILED
Expected Errno::EACCES but no exception was raised (0 was returned)
.../ruby/spec/ruby/library/socket/socket/bind_spec.rb:119:in `block (6 levels) in <top (required)>'
.../ruby/spec/ruby/library/socket/socket/bind_spec.rb:85:in `<top (required)>'
```
2021-12-08 13:26:53 +09:00
John Hawthorn 4a3e7984bf
Avoid Array allocation when appending to args array (#5211)
* Use duparray when possible for argspush

ARGSPUSH is the node we see with a single value pushed to the end of a
splatted array. ARGSCAT is similar, but is used when multiple values are
being concatenated to the list.

Previously only ARGSCAT had an optimization where when all the values
were static it would use duparray instead of newarray to create the
intermediate array.

This commit adds similar behaviour for ARGSPUSH, using duparray instead
of putobject/newarray.

* Replace duparray with putobject before concatarray

When performing duparray/concatarray we know we'll never use the
intermediate array being created by duparray, so we should be able to
use it as a temporary object.

This avoids an extra array allocation for NODE_ARGSPUSH (ex. [*foo, 1])
and NODE_ARGSCAT (ex. [*foo, 1, 2]).
2021-12-07 15:18:11 -08:00
David Rodríguez 852ea1e893 [rubygems/rubygems] Remove unnecessary comment
https://github.com/rubygems/rubygems/commit/5e50f12e7a
2021-12-08 07:59:35 +09:00
David Rodríguez 76cad13759 [rubygems/rubygems] Don't add custom github source to `bundle init` Gemfile
It's provided by bundler.

https://github.com/rubygems/rubygems/commit/25ccaab46b
2021-12-08 07:59:34 +09:00
David Rodríguez f0ef9ffed1 [rubygems/rubygems] Cancel deprecation of custom git sources
https://github.com/rubygems/rubygems/commit/99cd6e0627
2021-12-08 07:59:34 +09:00
Alan Wu 6beb05c2ad YJIT: Undo add_block_version() in OOM code path
Preivously, [1] failed to undo the effect of applying
add_block_version() to a block, leaving dangling pointers in the iseq
when compilation fails.

[1]: d0772632bf
2021-12-07 17:20:56 -05:00
Alan Wu 286c07f0dc YJIT: Remove guard_self_is_heap()
It's superseded by functionality added to jit_guard_known_klass().
In weird situations such as the ones in the included test,
guard_self_is_heap() triggered assertions.

Co-authored-by: Jemma Issroff <jemmaissroff@gmail.com>
2021-12-07 17:20:34 -05:00
git e51d0d2853 * 2021-12-08 [ci skip] 2021-12-08 01:49:36 +09:00
Simon Fish 1b12ebb94e [rubygems/rubygems] Add require parameter to `bundle add``
Test and ensure "false" is handled

Don't use yield_self to operate on autorequire

Remove duplicate autorequire

Add banner to require option

Don't use json to break down require params

Pass linter

https://github.com/rubygems/rubygems/commit/a4f2f8ac17
2021-12-08 01:49:20 +09:00