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

86646 Коммитов

Автор SHA1 Сообщение Дата
Alan Wu 99825a539f [DOC] Note that rb_obj_freeze_inline() can raise NoMemoryError
And move it back to a public header because Doxygen might not be
scanning the .c files.

[Feature #18776]
2024-07-17 10:25:20 -04:00
Alan Wu cd428b490d [DOC] No more is rb_ary_freeze() an alias of rb_obj_freeze()
[Feature #20589]
2024-07-17 10:25:20 -04:00
Peter Zhu 403f44ec2c Make OBJ_ID_INCREMENT == RUBY_IMMEDIATE_MASK + 1
All the non-GC objects (i.e. immediates) have addresses such that
`obj % RUBY_IMMEDIATE_MASK != 0` (except for `Qfalse`, which is 0). We
can define `OBJ_ID_INCREMENT` as `RUBY_IMMEDIATE_MASK + 1` which should
guarantee that GC objects never have conflicting object IDs with
immediates.
2024-07-17 09:01:42 -04:00
Matt Valentine-House 690ea013ca Remove unused variable from GC compaction path 2024-07-17 12:47:27 +01:00
David Rodríguez 3c3cce13c6 [rubygems/rubygems] Fix another case of `bundle lock --add-platform` doing nothing
https://github.com/rubygems/rubygems/commit/0629e27dda
2024-07-17 11:14:53 +00:00
Hiroshi SHIBATA 58aebcbce1 [rubygems/rubygems] Applied rubocop
https://github.com/rubygems/rubygems/commit/c26054e7e9
2024-07-17 10:17:57 +00:00
Yusuke Endoh 3f65df48bd Report a TracePoint log when the TracePoint tests fail 2024-07-17 18:41:39 +09:00
Hiroshi SHIBATA af60317861 Removed needless block arguments 2024-07-17 17:37:57 +09:00
Hiroshi SHIBATA 2a12e4ffec To avoid fd leak with fetch request for SSL server 2024-07-17 17:37:57 +09:00
Hiroshi SHIBATA e55bae4a67 Close leaked TCPServer socket 2024-07-17 17:37:57 +09:00
Hiroshi SHIBATA 76386ba1c0 Close leaked SSLServer socket 2024-07-17 17:37:57 +09:00
Hiroshi SHIBATA f4c642edb1 Fixed fd leak from TCPServer
```
Leaked file descriptor: HTTPSProxyTest#test_https_proxy_ssl_connection: 8 : #<TCPServer:fd 8, AF_INET, 127.0.0.1, 63104>
```
2024-07-17 17:37:57 +09:00
Naoto Ono 2b3bfbc4c7 Launchable: Fix Python package path 2024-07-17 16:53:58 +09:00
Nobuyoshi Nakada 03a0ade90d
Fix double free when `getcwd` does not allocate buffer
Do not free the result at normal return from `ruby_getcwd`.
2024-07-17 15:16:21 +09:00
Nobuyoshi Nakada 05502c1dda
Add a macro to initialize `struct getattrlist_args` 2024-07-17 12:00:27 +09:00
Iskren 371790165f
[DOC] Fix and improve array slicing example in range.c
* [DOC] Fix typo in range.c

  In the example of the beginless range used for array slicing,
  '..' range literal was used while the '...' literal was expected

* [DOC] Add example for array slicing in range.c

  Add an example for the array slice with the beginless range
  using the '..' range literal

* [DOC] Add comments for array slicing in range.c

  Add comments to make crystal clear what the '..' and '...'
  range literals do when used for array slicing as beginless range
2024-07-17 11:42:29 +09:00
Jeremy Evans dabb6c49aa
Release GVL around {,f}getattrlist calls in dir.c
Fixes [Bug #20587]
2024-07-16 19:20:17 -07:00
Peter Zhu c083a3ffcd Fix memory leak reported in main ractor when RUBY_FREE_AT_EXIT
STACK OF 1 INSTANCE OF 'ROOT LEAK: <calloc in rb_ractor_main_alloc>':
6   dyld                                  0x1840e20e0 start + 2360
5   miniruby                              0x1006796c8 main + 88  main.c:62
4   miniruby                              0x10072f4a4 ruby_init + 16  eval.c:99
3   miniruby                              0x10072f328 ruby_setup + 104  eval.c:81
2   miniruby                              0x1008d08c0 Init_BareVM + 508  vm.c:4276
1   miniruby                              0x1007f8944 rb_ractor_main_alloc + 76  ractor.c:2034
0   libsystem_malloc.dylib                0x1842a4cac _malloc_zone_calloc_instrumented_or_legacy + 128
====
    1 (96 bytes) ROOT LEAK: <calloc in rb_ractor_main_alloc 0x1347075d0> [96]
2024-07-16 15:50:00 -04:00
Kevin Newton c4a021ef96 [ruby/prism] Move sample files under sample/prism
https://github.com/ruby/prism/commit/9e9b069404
2024-07-16 19:26:28 +00:00
Kevin Newton e3c5d73e0f
[PRISM] Omit two more ast tests that will not work without RubyVM::Ast 2024-07-16 14:41:42 -04:00
Kevin Newton b0a99d0da9 [PRISM] Properly compile branch conditions in their own sequence 2024-07-16 14:40:20 -04:00
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 65d3eacc80.
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