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

88613 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada c129e01125
Make `rb_ec_set_vm_stack` conformant to the C++11 requirement
Https://learn.microsoft.com/en-us/cpp/build/reference/zc-inline-remove-unreferenced-comdat?view=msvc-140
> If `/Zc:inline` is specified, the compiler enforces the C++11
> requirement that all functions declared inline must have a definition
> available in the same translation unit if they're used.
2024-11-17 19:56:02 +09:00
Nobuyoshi Nakada a6fe3feacd
Win32: Remove unreferenced COMDAT from object files
Windows 11 SDK Version 10.0.26100.0 introduced a new internal inline
function in ucrt/corecrt_math.h.  Even it appears in object files and
will be included in the DEF file, it will be removed from the DLL and
result in a linker error.
2024-11-17 19:29:16 +09:00
Nobuyoshi Nakada 6588cc4e29
Workaround for VC 19.42.34433 again
Prefix underscore is already removed here.
2024-11-17 10:54:20 +09:00
Misaki Shioi 3c30af77fe
Fix stack-use-after-return (#12105)
http://ci.rvm.jp/results/trunk_asan@ruby-sp1/5409001

```
=================================================================
==3263562==ERROR: AddressSanitizer: stack-use-after-return on address 0x735a8f190da8 at pc 0x735a6f58dabc bp 0x735a639ffd10 sp 0x735a639ffd08
READ of size 4 at 0x735a8f190da8 thread T211
=================================================================
```
2024-11-17 10:36:33 +09:00
Nobuyoshi Nakada bc409f3fe3
Workaround for VC 19.42.34433
Suddenly it began to add `_ucrt_int_to_float` by the recent version.
2024-11-17 00:05:38 +09:00
Nobuyoshi Nakada 7be4c0a88d
mkexports.rb: Revert removed flip-flop
This reverts commit 63ae1e3cb5.
2024-11-16 22:46:26 +09:00
HoneyryderChuck 002438767d [ruby/io-nonblock] mark extension as ractor safe
https://github.com/ruby/io-nonblock/commit/ba445b37d5
2024-11-16 04:18:14 +00:00
git 421fecbbfa Update default gems list at 2a0f8d62b6 [ci skip] 2024-11-15 16:10:30 +00:00
Schneems 2a0f8d62b6 [ruby/syntax_suggest] v2.0.2
https://github.com/ruby/syntax_suggest/commit/e99b5ba287
2024-11-15 16:09:30 +00:00
Schneems 3a547e2539 [ruby/syntax_suggest] Explain why class exists
https://github.com/ruby/syntax_suggest/commit/8c36b0cb35
2024-11-15 16:06:25 +00:00
Schneems 03a77c03eb [ruby/syntax_suggest] Fix spelling
https://github.com/ruby/syntax_suggest/commit/9c78283363
2024-11-15 16:06:24 +00:00
Schneems 7969f6791f [ruby/syntax_suggest] Freeze strings
https://github.com/ruby/syntax_suggest/commit/b17bf0baca
2024-11-15 16:06:24 +00:00
Nobuyoshi Nakada ed4871afed
Update `rubyarchdir` and `rubylibdir` as well for tests
These are also different between build time and after installation.
2024-11-15 18:28:16 +09:00
Misaki Shioi 84470d72c5
Disable HEv2 tests temporarily (#12097)
* Disable HEv2 tests temporarily

To suppress error log output in CI.
They should have been DISABLE in PR #12070.

---

Additionally, the following fixes have been made:

- Remove unnecessary `assert_separately` from the related tests
2024-11-15 18:12:37 +09:00
git 31741719ae * append newline at EOF. [ci skip] 2024-11-15 08:50:34 +00:00
Hiroshi SHIBATA a6f25023ac Port test_warn_zeitwerk.rb to RSpec example 2024-11-15 17:50:24 +09:00
Hiroshi SHIBATA 5bd0dfbf2e Port test_warn_bootsnap_and_gem.rb to RSpec example 2024-11-15 17:50:24 +09:00
Hiroshi SHIBATA 5395afd422 Port test_warn_bootsnap_rubyarchdir_gem.rb to RSpec example 2024-11-15 17:50:24 +09:00
Hiroshi SHIBATA 0afd77d76a Port test_warn_bootsnap.rb to RSpec example 2024-11-15 17:50:24 +09:00
Nobuyoshi Nakada b4d8e90c2a
`rb_bug` prints a newline after the given message [ci skip] 2024-11-15 14:52:31 +09:00
Hiroshi SHIBATA b45f7a54af Find .ext/common path from LOAD_PATH for out-of-place build 2024-11-15 14:04:19 +09:00
Hiroshi SHIBATA 8dccf5a334 Port test_no_warn_sub_feature.rb to RSpec example 2024-11-15 14:04:19 +09:00
Hiroshi SHIBATA 52e867268e Port test_warn_sub_feature.rb to RSpec example 2024-11-15 14:04:19 +09:00
Hiroshi SHIBATA c5637f940a fiddle provide sub-feature like fiddle/import 2024-11-15 14:04:19 +09:00
Hiroshi SHIBATA 587955169e Port -r option test to RSpec examples 2024-11-15 14:04:19 +09:00
Hiroshi SHIBATA 208c46702a Port bundle exec with shebang script to RSpec example 2024-11-15 14:04:19 +09:00
Hiroshi SHIBATA 703cffffc9 Port bundle exec warning check to RSpec example 2024-11-15 14:04:19 +09:00
Hiroshi SHIBATA 49fde29f77 Port test_no_warn_dependency.rb to RSpec example 2024-11-15 14:04:19 +09:00
Hiroshi SHIBATA bb20083050 Port test_warn_dependency.rb to RSpec example 2024-11-15 14:04:19 +09:00
Hiroshi SHIBATA 699e710ad8 Port test_no_warn_dash_gem.rb to RSpec example 2024-11-15 14:04:19 +09:00
Nobuyoshi Nakada 8e98fbdd19 [ruby/net-http] Remove deprecated constants
These constants, isolated in net/http/backward.rb, have not only been
deprecated since 2001, but have also had a warning since 2021.

https://github.com/ruby/net-http/commit/265bfa929f
2024-11-15 03:15:04 +00:00
dependabot[bot] 1b417c3e64 Bump github/codeql-action from 3.27.3 to 3.27.4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.3 to 3.27.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](396bb3e453...ea9e4e3799)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-15 11:38:40 +09:00
Schneems 226cfda306 [ruby/syntax_suggest] Fix missing line break due to puts logic
In #225 it was reported that the output looks incorrect:

```
$ cat /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
def x.y.z
end
$ ruby /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
/tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb: --> /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
expected a delimiter to close the parametersunexpected '.', ignoring it
> 1  def x.y.z
> 2  end
```

Specifically:

```
expected a delimiter to close the parametersunexpected '.', ignoring it
```

However this does not show up when executing the debug executable:

```
$ bin/bundle exec exe/syntax_suggest /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
--> /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb

expected a delimiter to close the parameters
unexpected '.', ignoring it

> 1  def x.y.z
> 2  end
```

This is because `exe/syntax_suggest` uses STDOUT.puts while calling `ruby` with the filename uses a fake IO object represented by MiniStringIO. This class was incorrectly not adding a newline to the end of the print.

The fix was to move the class to it's own file where it can be tested and then fix the behavior.

close https://github.com/ruby/syntax_suggest/pull/225

https://github.com/ruby/syntax_suggest/commit/d2ecd94a3b

Co-authored-by: Andy Yong <andyywz@gmail.com>
2024-11-15 01:31:26 +00:00
Misaki Shioi 51666c827b
Make fast_fallback option false by default temporarily (#12070)
to suppress failing output in CI.
2024-11-15 09:18:09 +09:00
Dave Corson-Knowles facb82aba5 [rubygems/rubygems] Update test_project_sanity.rb
https://github.com/rubygems/rubygems/commit/279eefb8a3
2024-11-14 23:21:05 +00:00
Hiroshi SHIBATA 11265baed9 Use environmental variable for bundled_gems_spec.rb 2024-11-15 08:16:03 +09:00
Hiroshi SHIBATA 2d2e5a38bf Port test_warn_redefined.rb to RSpec example 2024-11-15 08:16:03 +09:00
Hiroshi SHIBATA 1063b5a140 Port test_warn_dash_gem.rb to RSpec example 2024-11-15 08:16:03 +09:00
Hiroshi SHIBATA b44272fcb4 Port test_warn_bundled_gems.rb to RSpec example 2024-11-15 08:16:03 +09:00
Takashi Kokubun 31bdffb5b9
YJIT: Specialize String#dup (#12090) 2024-11-14 18:15:39 -05:00
tomoya ishida 8f3a6ebcf4 [ruby/reline] Drop loading terminfo, remove fiddle dependency in
non-windows environment.
(https://github.com/ruby/reline/pull/769)

Reline works perfectly in most major terminal emulators without terminfo.
In minor/old terminal emulator, we used to get key bindings from terminfo, but I think it is not used so much.

https://github.com/ruby/reline/commit/3ceba3bff7
2024-11-14 23:14:18 +00:00
Yusuke Endoh 4074c6b427 Fix a stack-buffer-overflow bug
http://ci.rvm.jp/results/trunk_asan@ruby-sp1/5408428
```
==3159643==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x796cf8f09041 at pc 0x6539bbf68ded bp 0x796cfadffcf0 sp 0x796cfadff4b8
READ of size 2 at 0x796cf8f09041 thread T13
    #0 0x6539bbf68dec in strlen (/tmp/ruby/build/trunk_asan/ruby+0x18edec) (BuildId: cca267c7ae091060e1b82a6b4ed1aeaf00edebab)
```
2024-11-14 11:29:47 -06:00
Takashi Kokubun 7e2f9eaccd
YJIT: Specialize Integer#pred (#12082) 2024-11-14 12:04:48 -05:00
Misaki Shioi fd4b27472e
Do not wait connection attempt delay without in progress fds (#12087)
Do not wait Connection Attempt Delay without in progress fds

Reset Connection Attempt Delay when connection fails and there is no other socket connection in progress.
This is intended to resolve an issue that was temporarily worked around in Pull Request #12062.

`TCPServer::new` (used in tests such as `TestNetHTTP_v1_2_chunked#test_timeout_during_non_chunked_streamed_HTTP_session_write`) can only connect over either IPv6 or IPv4, depending on the environment.
Since HEv2 attempts to connect over IPv6 first, environments where IPv6 connections are unavailable return ECONNREFUSED immediately.
In such cases, the client should immediately retry the connection over IPv4.
However, HEv2 includes a specification for a "Connection Attempt Delay," where it waits 250ms after the previous connection attempt before starting the next one.
This delay causes Net::OpenTimeout (100ms) to be exceeded while waiting for the next connection attempt to start.

With this change, when a connection attempt fails, if there are sockets still attempting to connect and there are addresses yet to be tried, the Connection Attempt Delay will be resetted, allowing the next connection attempt to start immediately.

---

Additionally, the following minor fixes have been made:

- The `nfds` value used for select(2) is now reset with each wait.
2024-11-15 00:25:59 +09:00
Peter Zhu 54ff9d3525 Remove dependency of version.c on gc/gc.h
version.c does not depend on gc/gc.h.
2024-11-14 07:50:05 -06:00
Matt Valentine-House 42501015b4 rb_raise when attempting to set the GC implementation name
Instead of silently ignoring the key, we should raise to clearly tell
the user that this key is read-only.
2024-11-14 10:46:36 +00:00
Matt Valentine-House 6795fc4981 rb_bug if rb_gc_impl_active_gc_name is too long
This avoids the need to malloc, and reduces the complexity of truncating
the long string for display in RUBY_DESCRIPTION.

The developer of a GC implementation should be responsible for giving it
a succinct name.
2024-11-14 10:46:36 +00:00
Matt Valentine-House ee290c94a3 Include the currently active GC in RUBY_DESCRIPTION
This will add +MOD_GC to the version string and Ruby description when
Ruby is compiled with shared gc support.

When shared GC support is compiled in and a GC module has been loaded
using RUBY_GC_LIBRARY, the version string will include the name of
the currently active GC as reported by the rb_gc_active_gc_name function
in the form

+MOD_GC[gc_name]

[Feature #20794]
2024-11-14 10:46:36 +00:00
Matt Valentine-House fa10441981 Expose GC.config[:implementation], to query the currently active GC
And a default and readonly key to the GC.config hash that names the
current GC implementation.

This is provided by each implementation by the API function
rb_gc_impl_active_gc_name
2024-11-14 10:46:36 +00:00
Hiroshi SHIBATA 8a4ce4e9a9 [rubygems/rubygems] URI::DEFAULT_PARSER.escape is obsoleted. We should use URI::RFC2396_PARSER.escape explicitly
https://github.com/rubygems/rubygems/commit/64f026c9d4
2024-11-14 07:44:01 +00:00