86825 Commits

Author SHA1 Message Date
Kevin Newton
90e945a7b7 [PRISM] Fix up ensure+loop+break 2024-07-16 14:40:20 -04:00
Stan Lo
4a4e1bf357 [ruby/irb] Group class methods under class << self
(https://github.com/ruby/irb/pull/981)

https://github.com/ruby/irb/commit/cdaa356df2
2024-07-16 15:58:15 +00:00
Peter Zhu
4fe3082b63 [DOC] Fix typo in gc/default.c 2024-07-16 09:55:48 -04:00
Nobuyoshi Nakada
60d3ed5043 [Bug #20457] Drop unreachable return at end of method 2024-07-16 22:11:28 +09:00
Peter Zhu
93489d536b Remove dependency on dtrace when building shared GC 2024-07-16 09:09:41 -04:00
Peter Zhu
db3472d84c Set BUILDING_SHARED_GC when building shared GC 2024-07-16 09:09:41 -04:00
Nobuyoshi Nakada
e722f4c57f Stop using sigsetjmp to hijack SIGCHLD handler
It already has been dead code.
Follow up of 65d3eacc80bbefb29e5cd0f3f9661d886f2e4cee.
2024-07-16 18:41:42 +09:00
git
6dd1ab0f9f Update bundled gems list as of 2024-07-16 2024-07-16 06:59:05 +00:00
Shugo Maeda
e048a073a3 Add MatchData#bytebegin and MatchData#byteend
These methods return the byte-based offset of the beginning or end of the specified match.

[Feature #20576]
2024-07-16 14:48:06 +09:00
卜部昌平
a887b41875 static const char *type_name() implemented
The function body was missing.
2024-07-16 13:09:19 +09:00
卜部昌平
963059a8d2 fix compile error 2024-07-16 13:09:19 +09:00
Hiroshi SHIBATA
7a0e6f1d12
Follow-up resolv and win32 integration
https://github.com/ruby/resolv/pull/54
2024-07-16 12:12:40 +09:00
Kazuhiro NISHIYAMA
b01cf8ccde
Fix a typo
[Misc #20636]
2024-07-16 11:40:50 +09:00
Alan Wu
a1435981e9 [DOC] Document RbConfig::SIZEOF 2024-07-15 21:08:13 -04:00
Alan Wu
3531d22918 [DOC] Document RbConfig::LIMITS 2024-07-15 21:08:13 -04:00
Alan Wu
9bf1049dfb Refactor so RDoc picks up RbConfig::{SIZEOF,LIMITS} 2024-07-15 21:08:13 -04:00
nicholas a. evans
e165d92d37
[ruby/rdoc] Drop reimplementation of Ripper lex state
(https://github.com/ruby/rdoc/pull/1118)

* Drop reimplementation of Ripper lex state

This code was for ruby 2.4 compatibility, but rdoc dropped support for
ruby 2.4 about three years ago, in f480b970c.  This code was almost half
of the lines of code in rdoc/parser/ripper_state_lex.

* Remove unused Ripper constants and const_defined?

This was mostly copied from the diff in @st0012's PR comment.  The
remaining constants have been updated to get their value directly from
Ripper.

Co-authored-by: Stan Lo <stan001212@gmail.com>

* Use Ripper::EXPR_LABEL directly

Since this is only used from outside RipperStateLex, there's no longer
any benefit to using the indirect reference rather than just going
straight to Ripper.

---------

https://github.com/ruby/rdoc/commit/dd8c216263

Co-authored-by: Stan Lo <stan001212@gmail.com>
2024-07-16 07:22:11 +09:00
dependabot[bot]
3f679c02a9 [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.97 to 0.9.98.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.97...v0.9.98)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

https://github.com/rubygems/rubygems/commit/291a5ad53c
2024-07-15 20:17:37 +00:00
Kevin Newton
2911578ed7
[PRISM] Add missing rescue tracepoint for rescue modifier 2024-07-15 15:03:54 -04:00
Maxime Chevalier-Boisvert
d989bc54e2
YJIT: split chain_depth and flag booleans in context (#11169)
Split these values to avoid using a bit mask in the context
Use variable length encoding to save a few bits on chain depth
2024-07-15 14:45:18 -04:00
Kevin Newton
c06f79c575 [ruby/prism] Fix up implicit flags
https://github.com/ruby/prism/commit/f4152c1f50
2024-07-15 18:12:37 +00:00
Kevin Newton
8080de04be [PRISM] Optimize inner static literal hashes 2024-07-15 14:04:25 -04:00
Kevin Newton
c1e5358448 [PRISM] Optimize pushing large hash literals 2024-07-15 14:04:25 -04:00
Kevin Newton
b38493c572 [PRISM] Chunk sub-arrays of static literals in array literals
Co-authored-by: Adam Hess <HParker@github.com>
2024-07-15 14:04:25 -04:00
Kevin Newton
fb6d54143d [PRISM] Optimizations for compiling large arrays 2024-07-15 14:04:25 -04:00
Peter Zhu
2245f278d3 Remove unused ruby_initial_gc_stress 2024-07-15 11:28:00 -04:00
Takashi Kokubun
ec773e15f4
YJIT: Local variable register allocation (#11157)
* YJIT: Local variable register allocation

* locals are not stack temps

* Rename RegTemps to RegMappings

* Rename RegMapping to RegOpnd

* Rename local_size to num_locals

* s/stack value/operand/

* Rename spill_temps() to spill_regs()

* Clarify when num_locals becomes None

* Mention that InsnOut uses different registers

* Rename get_reg_mapping to get_reg_opnd

* Resurrect --yjit-temp-regs capability

* Use MAX_CTX_TEMPS and MAX_CTX_LOCALS
2024-07-15 10:56:57 -04:00
Peter Zhu
461a7b8316 Add gc/gc.h for functions in gc.c and used by GC implementations 2024-07-15 08:57:14 -04:00
Peter Zhu
4b0244a1f3 Rename GC_IMPL_H macro to GC_GC_IMPL_H 2024-07-15 08:57:14 -04:00
Nobuyoshi Nakada
3219ecf4f6 Win32: Skip check for VS2022 FP BUG by default 2024-07-15 16:34:23 +09:00
dependabot[bot]
727f2bd3ae Bump github/codeql-action from 3.25.11 to 3.25.12
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.11 to 3.25.12.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b611370bb5...4fa2a79536)

---
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-07-15 11:41:06 +09:00
Jeremy Evans
8ade9994bf
Release GVL around system calls in dir.c
* Release GVL for fdopendir calls
* Release GVL for readdir calls
* Release GVL for chdir call in dir_chdir0
* Release GVL for fchdir call in dir_fchdir
* Release GVL for chroot calls
* Release GVL for lstat calls
* Release GVL for stat calls
* Release GVL for fstatat calls
* Release GVL for getpwnam call in rb_home_dir_of
  (technically in file.c, but called from dir.c)

This does not release GVL for readdir/stat/lstat on Windows,
as that causes issues because the emulation functions that
are called in win32.c require the GVL.

This also removes some explicit casts either to or from void *,
which are allowed implicitly.  The remaining casts to or from
void * are part of function pointer casts, which are not
allowed implicitly and will generate a warning.
2024-07-14 12:02:00 -07:00
Nobuyoshi Nakada
949573028b
Win32: OpenSSL 1.1 DLLs are no longer used
We are already using OpenSSL 3.3 and have no possibility to use system
provided DLLs.
2024-07-14 19:18:09 +09:00
Nobuyoshi Nakada
880b7f1513
Win32: Pass triplet option to vcpkg 2024-07-14 19:09:13 +09:00
kimuraw (Wataru Kimura)
7472fff7f1
[Bug #20633] Fix the condition for atomic_signal_fence
`AC_CHECK_DECLS` defines `HAVE_DECL_SYMBOL` to 1 if declared, 0
otherwise, not undefined.
2024-07-14 10:36:35 +09:00
Peter Zhu
84138f52b8 [DOC] Add missing period in NEWS.md 2024-07-12 10:54:48 -04:00
Peter Zhu
17b71e6c2e [DOC] Fix link in NEWS.md for [Feature #20443] 2024-07-12 10:53:25 -04:00
Kevin Newton
6298667ff5 [ruby/prism] When parsing an invalid write, still add to the local table
https://github.com/ruby/prism/commit/a54abc4d1b
2024-07-12 13:50:00 +00:00
Matt Valentine-House
ca99f86bd6 Add GC.config to NEWS.md 2024-07-12 14:43:33 +01:00
Matt Valentine-House
8418df72ec Avoid extra module linkage in gc/default.c
We don't need to use rb_str_to_cstr here, which means we don't need to
include string headers anymore.
2024-07-12 14:43:33 +01:00
Matt Valentine-House
3ccc6e0b6a Document GC.config 2024-07-12 14:43:33 +01:00
Matt Valentine-House
4d77803a66 Rename full_mark -> rgengc_allow_full_mark 2024-07-12 14:43:33 +01:00
Matt Valentine-House
f543c68e1c Provide GC.config to disable major GC collections
This feature provides a new method `GC.config` that configures internal
GC configuration variables provided by an individual GC implementation.

Implemented in this PR is the option `full_mark`: a boolean value that
will determine whether the Ruby GC is allowed to run a major collection
while the process is running.

It has the following semantics

This feature configures Ruby's GC to only run minor GC's. It's designed
to give users relying on Out of Band GC complete control over when a
major GC is run. Configuring `full_mark: false` does two main things:

* Never runs a Major GC. When the heap runs out of space during a minor
  and when a major would traditionally be run, instead we allocate more
  heap pages, and mark objspace as needing a major GC.
* Don't increment object ages. We don't promote objects during GC, this
  will cause every object to be scanned on every minor. This is an
  intentional trade-off between minor GC's doing more work every time,
  and potentially promoting objects that will then never be GC'd.

The intention behind not aging objects is that users of this feature
should use a preforking web server, or some other method of pre-warming
the oldgen (like Nakayoshi fork)before disabling Majors. That way most
objects that are going to be old will have already been promoted.

This will interleave major and minor GC collections in exactly the same
what that the Ruby GC runs in versions previously to this. This is the
default behaviour.

* This new method has the following extra semantics:
  - `GC.config` with no arguments returns a hash of the keys of the
    currently configured GC
  - `GC.config` with a key pair (eg. `GC.config(full_mark: true)` sets
    the matching config key to the corresponding value and returns the
    entire known config hash, including the new values. If the key does
    not exist, `nil` is returned

* When a minor GC is run, Ruby sets an internal status flag to determine
  whether the next GC will be a major or a minor. When `full_mark:
  false` this flag is ignored and every GC will be a minor.

  This status flag can be accessed at
  `GC.latest_gc_info(:needs_major_by)`. Any value other than `nil` means
  that the next collection would have been a major.

  Thus it's possible to use this feature to check at a predetermined
  time, whether a major GC is necessary and run one if it is. eg. After
  a request has finished processing.

  ```ruby
  if GC.latest_gc_info(:needs_major_by)
    GC.start(full_mark: true)
  end
  ```

[Feature #20443]
2024-07-12 14:43:33 +01:00
Peter Zhu
00d0ddd48a Add gc/gc_impl.h for GC implementation headers 2024-07-12 08:41:33 -04:00
tomoya ishida
17a4c7cfcf [ruby/reline] Fix rendering bug of nomultiline prompt
(https://github.com/ruby/reline/pull/730)

Fix bug of `print('a'*10); Reline.readline('>')` wrong rendering

https://github.com/ruby/reline/commit/c0469a12b9
2024-07-12 12:21:26 +00:00
Nobuyoshi Nakada
94b87084a6 [ruby/win32ole] win32ole.c: repeated code
* ext/win32ole/win32ole.c (ole_variant2val): reduce repeated code
  between byref and byval.

https://github.com/ruby/win32ole/commit/e753c6abdd
2024-07-12 09:45:06 +00:00
Yusuke Endoh
bb1ef81732 [ruby/error_highlight] Make test_COLON2_5 conditional again
https://github.com/ruby/error_highlight/commit/da5e76bb06
2024-07-12 06:26:53 +00:00
Hiroshi SHIBATA
371055979f Pend some tests because these are not working with macOS 15 beta and Xcode 16 beta 2024-07-12 13:38:22 +09:00
卜部昌平
fa6bf1da57 give up USE_GC_MALLOC_OBJ_INFO_DETAILS
This feature is no longer possible under current design; now that our GC
is pluggable, we cannot assume what was achieved by this compiler flag
is always possble by the dynamically-loaded GC implementation.
2024-07-12 10:21:07 +09:00
Hiroshi SHIBATA
9acc0efdc1
Use fixture certificates to fix test failure with RHEL9.
http://rubyci.s3.amazonaws.com/rhel9/ruby-master/log/20240711T213004Z.fail.html.gz

```
  1) Error:
HTTPSProxyTest#test_https_proxy_ssl_connection:
OpenSSL::X509::CertificateError: invalid digest
    /home/chkbuild/chkbuild/tmp/build/20240711T213004Z/ruby/test/net/http/test_https_proxy.rb:63:in 'OpenSSL::X509::Certificate#sign'
    /home/chkbuild/chkbuild/tmp/build/20240711T213004Z/ruby/test/net/http/test_https_proxy.rb:63:in 'HTTPSProxyTest#test_https_proxy_ssl_connection'
```
2024-07-12 09:15:12 +09:00