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

87713 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada c1d6d55f5a
Assert in only one place just after adding an argument 2024-10-02 22:03:32 +09:00
Peter Zhu 6acf03618a Mark iseq keyword default values during compilation
During compilation, we write keyword default values into the iseq, so we
should mark it to ensure it does not get GC'd.

This might fix issues on ASAN like
http://ci.rvm.jp/logfiles/brlog.trunk_asan.20240927-194923

    ==805257==ERROR: AddressSanitizer: use-after-poison on address 0x7b7e5e3e2828 at pc 0x5e09ac4822f8 bp 0x7ffde56b0140 sp 0x7ffde56b0138
    READ of size 8 at 0x7b7e5e3e2828 thread T0
    #0 0x5e09ac4822f7 in RB_BUILTIN_TYPE include/ruby/internal/value_type.h:191:30
    #1 0x5e09ac4822f7 in rbimpl_RB_TYPE_P_fastpath include/ruby/internal/value_type.h:352:19
    #2 0x5e09ac4822f7 in gc_mark gc/default.c:4488:9
    #3 0x5e09ac51011e in rb_iseq_mark_and_move iseq.c:361:17
    #4 0x5e09ac4b85c4 in rb_imemo_mark_and_move imemo.c:386:9
    #5 0x5e09ac467544 in rb_gc_mark_children gc.c:2508:9
    #6 0x5e09ac482c24 in gc_mark_children gc/default.c:4673:5
    #7 0x5e09ac482c24 in gc_mark_stacked_objects gc/default.c:4694:9
    #8 0x5e09ac482c24 in gc_mark_stacked_objects_all gc/default.c:4732:12
    #9 0x5e09ac48c7f9 in gc_marks_rest gc/default.c:5755:9
    #10 0x5e09ac48c7f9 in gc_marks gc/default.c:5870:9
    #11 0x5e09ac48c7f9 in gc_start gc/default.c:6517:13
2024-10-02 08:54:18 -04:00
Nobuyoshi Nakada 3e1021b144 Make default parser enum and define getter/setter 2024-10-02 20:43:40 +09:00
Nobuyoshi Nakada 4e219d8f7d Split appending options to ruby_description
It's becoming tedious to map each format specifier to an argument.
2024-10-02 20:43:40 +09:00
David Rodríguez acbdb30941 [rubygems/rubygems] Fix error in one source when fetching dependency APIs clearing results from all sources
https://github.com/rubygems/rubygems/commit/0549ddbcc5
2024-10-02 10:37:26 +00:00
git 7469b8308d Update bundled gems list at bb97061f65 [ci skip] 2024-10-02 09:04:01 +00:00
Hiroshi SHIBATA bb97061f65 SKip failing tests that are caused by unknown IOError 2024-10-02 18:03:18 +09:00
Hiroshi SHIBATA 973d470288 Update bundled_gems 2024-10-02 18:03:18 +09:00
Nithin Bekal fe8d7ca853 [DOC] Alias Float#magnitude to abs 2024-10-02 17:32:35 +09:00
Nithin Bekal b7a33aef9e [DOC] Keep example styles consistent
The examples of chaining for other methods, such as #tap have the dot at
the start of the line, while #then has it at the end of the previous
line. Updated this to have consistent style in Kernel docs.
2024-10-02 17:07:46 +09:00
Nithin Bekal bae3d68134 [DOC] Remove repeated examples for Kernel#then 2024-10-02 17:07:46 +09:00
Nithin Bekal 5eb7cbf4e3 [DOC] Alias Kernel#yield_self to #then 2024-10-02 17:06:02 +09:00
Sutou Kouhei d2ec0e8039 [ruby/fiddle] test memory-view: ensure releasing in test
It's for avoiding calling release on exit via GC. If it's happen, Ruby
will be crashed because Fiddle::MemoryView's finalizer may refer other
Ruby object. In exit phrase, the referred Ruby object may be already
freed.

https://github.com/ruby/fiddle/commit/02915f13de
2024-10-02 14:36:11 +09:00
Sutou Kouhei c991085176 [ruby/fiddle] test: remove fragile memory leak tests
https://github.com/ruby/fiddle/commit/0bfcd02bef
2024-10-02 14:36:10 +09:00
David Rodríguez 9d4e7b376a
Make spec file for env helpers more generic 2024-10-02 14:34:55 +09:00
David Rodríguez 5000138084
[rubygems/rubygems] Fix `bundler/inline` resetting ENV
https://github.com/rubygems/rubygems/commit/72d8d4dbba
2024-10-02 14:34:55 +09:00
David Rodríguez a3929a9ca1
[rubygems/rubygems] The `BUNDLER_SETUP` env should also be cleaned up
https://github.com/rubygems/rubygems/commit/47b7e50f64
2024-10-02 14:34:55 +09:00
David Rodríguez 49483904d8
[rubygems/rubygems] Make sure MissingSpecVersionError#to_s prints exception message
Gem command loading errors rely on `#to_s` on the raised exception, but
in the case of `MissingSpecVersionError` that was only the exception
name, making it printed twice and no message at all.

Before:

```
ERROR:  Loading command: install (Gem::MissingSpecVersionError)
 	Gem::MissingSpecVersionError
```

After:

```
ERROR:  Loading command: install (Gem::MissingSpecVersionError)
	Could not find 'io-wait' (>= 0.a) - did find: [io-wait-0.3.0-java]
  Checked in 'GEM_PATH=/Users/deivid/Code/rubygems/rubygems/bundler/tmp/1.1/gems/system' , execute `gem env` for more information
```

https://github.com/rubygems/rubygems/commit/d06944bb2f
2024-10-02 14:34:55 +09:00
David Rodríguez 02d50d9cb1
[rubygems/rubygems] Simplify command loading
https://github.com/rubygems/rubygems/commit/95f60f0e60
2024-10-02 14:34:54 +09:00
David Rodríguez 3d1eb62bf3
[rubygems/rubygems] Standarize "ins" test command too
https://github.com/rubygems/rubygems/commit/517e9a8669
2024-10-02 14:34:54 +09:00
David Rodríguez 8e73609c7b
[rubygems/rubygems] Fix weirdness of "interrupt" test command
https://github.com/rubygems/rubygems/commit/0a75590ac9
2024-10-02 14:34:54 +09:00
Hiroshi SHIBATA 63f31a9ed5 [ruby/singleton] Fixed double assignment
https://github.com/ruby/singleton/commit/9d3c77a868
2024-10-02 05:33:31 +00:00
Nithin Bekal 30775d0b08 [DOC] Fix typo in Forwardable docs 2024-10-02 14:13:00 +09:00
tomoya ishida a8a921aef3 [ruby/irb] Use correct binding in debug mode
(https://github.com/ruby/irb/pull/1007)

In debug command, IRB's context was using wrong binding.
Some code colorization, command detection failed because binding.local_variable returned wrong value.

https://github.com/ruby/irb/commit/68f718de21
2024-10-02 03:18:35 +00:00
BurdetteLamar 5edc321988 [DOC] Tweaks for Array#keep_if 2024-10-01 15:47:20 -04:00
BurdetteLamar e72e18b31d [DOC] Tweaks for Array#join 2024-10-01 15:46:25 -04:00
Kevin Newton 467ebbebd9 [ruby/prism] Disallow dynamic patterns in labels at top level followed by pipes
https://github.com/ruby/prism/commit/ccc746f918
2024-10-01 15:42:44 -04:00
tomoya ishida e320da6097 [ruby/reline] Fix Reline crash with invalid encoding history
(https://github.com/ruby/reline/pull/751)

https://github.com/ruby/reline/commit/e9d4b37e34
2024-10-01 17:01:38 +00:00
Kevin Newton ec230ac643 Resync to latest Prism 2024-10-01 11:03:25 -04:00
ydah 169a5ee99e Use user defined inline rules `user_or_keyword_variable` 2024-10-01 23:59:58 +09:00
Kevin Newton d86b4041b5 [ruby/prism] Disallow empty labels when not allowed
https://github.com/ruby/prism/commit/399ee28dc1
2024-10-01 13:51:05 +00:00
Kevin Newton 75568d23e9 [ruby/prism] Disallow &. after endless range
https://github.com/ruby/prism/commit/498dd922d4
2024-10-01 12:57:00 +00:00
Peter Zhu 3932d8a87a Replace heap_eden_total_slots with objspace_available_slots 2024-10-01 08:48:51 -04:00
Nobuyoshi Nakada 86ae409467
[Bug #20764] Refactor argument forwarding in lambda
Reject argument forwarding in lambda:
- without parentheses
- after optional argument(s)
2024-10-01 20:00:22 +09:00
Nobuyoshi Nakada 35e124832e
[Bug #20755] Frozen string should not be writable via IO::Buffer 2024-10-01 18:46:35 +09:00
Hiroshi SHIBATA 3ebc85e240
Define RactorLocalSingleton on .mspec.constants 2024-10-01 18:41:38 +09:00
Hiroshi SHIBATA d109c7c620
Temporary disabled RactorLocalSingleton from constant leak check. 2024-10-01 18:32:40 +09:00
rm155 0f00544984
[ruby/singleton] Make compatible with Ruby 2.4
https://github.com/ruby/singleton/commit/0a77bb492d
2024-10-01 17:59:43 +09:00
rm155 2f53c9fc62
[ruby/singleton] Clean VERSION freezing
https://github.com/ruby/singleton/commit/f31334a736
2024-10-01 17:59:42 +09:00
rm155 d0c1eef511
[ruby/singleton] Only use RactorLocalSingleton if Ractor is defined
https://github.com/ruby/singleton/commit/f684d36a47
2024-10-01 17:59:42 +09:00
rm155 a6e96df573
[ruby/singleton] Change PerRactorSingleton to RactorLocalSingleton
https://github.com/ruby/singleton/commit/1216a86303
2024-10-01 17:59:42 +09:00
rm155 136b30b414
[ruby/singleton] Improve Ractor-compliance; Create PerRactorSingleton
https://github.com/ruby/singleton/commit/ec4f66d9c1
2024-10-01 17:59:42 +09:00
Hiroshi SHIBATA 76111af632 expand relative path 2024-10-01 17:35:38 +09:00
Hiroshi SHIBATA 4822220e6b Pass MSPECOPT from compilers.yml 2024-10-01 17:35:38 +09:00
dependabot[bot] 522614a377 Bump github/codeql-action from 3.26.9 to 3.26.10
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.9 to 3.26.10.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](461ef6c76d...e2b3eafc8d)

---
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-10-01 12:34:58 +09:00
whtsht af63b4f8b7
Return an Iterator Instead of a Vector in `addrs_to_pages` Method (#11725)
* Returning an iterator instead of a vec

* Avoid changing the meaning of end_page

---------

Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2024-09-30 16:00:54 -07:00
Peter Zhu 30507a4aed Move RUBY_INTERNAL_EVENT_FREEOBJ into GC implementation
Instead of calling rb_gc_event_hook inside of rb_gc_obj_free, it should
be up to the GC implementation to call the event.
2024-09-30 14:23:32 -04:00
Nobuyoshi Nakada 292c9793ab
Remove no longer needed excludes files 2024-10-01 02:55:16 +09:00
Luke Gruber d592ddd5e6 Fix compile issue with a short-circuited if/unless condition and `defined?`
This caused an issue when `defined?` was in the `if` condition. Its
instructions weren't appended to the instruction sequence even though it was compiled
if a compile-time known logical short-circuit happened before the `defined?`. The catch table
entry (`defined?` compilation produces a catch table entry) was still on the iseq even though the
instructions weren't there. This caused faulty exception handling in the method.
The solution is to no add the catch table entry for `defined?` after a compile-time known logical
short circuit.

This shouldn't touch much code, it's only for cases like the following,
which can occur during debugging:

    if false && defined?(Some::CONSTANT)
    "more code..."
    end

Fixes [Bug #20501]
2024-10-01 02:12:56 +09:00
Peter Zhu 2a58092360 Remove unneeded prototype for objspace_available_slots 2024-09-30 12:58:43 -04:00