Skip to content

Commit

Permalink
Remove deprecated function rb_gc_force_recycle
Browse files Browse the repository at this point in the history
This function has been deprecated since Ruby 3.1, so we should remove it
for Ruby 3.4.
  • Loading branch information
peterzhu2118 committed Apr 5, 2024
1 parent 831b06e commit dbe8886
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 23 deletions.
4 changes: 3 additions & 1 deletion NEWS.md
Expand Up @@ -103,7 +103,8 @@ See GitHub releases like [GitHub Releases of Logger](https://github.com/ruby/log

## C API updates

* `rb_newobj` and `rb_newobj_of` (and corresponding macros `RB_NEWOBJ`, `RB_NEWOBJ_OF`, `NEWOBJ`, `NEWOBJ_OF`) have been removed [[Feature #20265]].
* `rb_newobj` and `rb_newobj_of` (and corresponding macros `RB_NEWOBJ`, `RB_NEWOBJ_OF`, `NEWOBJ`, `NEWOBJ_OF`) have been removed. [[Feature #20265]]
* Removed deprecated function `rb_gc_force_recycle`. [[Feature #18290]]

## Implementation improvements

Expand All @@ -113,6 +114,7 @@ See GitHub releases like [GitHub Releases of Logger](https://github.com/ruby/log

[Feature #13557]: https://bugs.ruby-lang.org/issues/13557
[Feature #16495]: https://bugs.ruby-lang.org/issues/16495
[Feature #18290]: https://bugs.ruby-lang.org/issues/18290
[Feature #18980]: https://bugs.ruby-lang.org/issues/18980
[Feature #19117]: https://bugs.ruby-lang.org/issues/19117
[Bug #19918]: https://bugs.ruby-lang.org/issues/19918
Expand Down
6 changes: 0 additions & 6 deletions gc.c
Expand Up @@ -8765,12 +8765,6 @@ rb_gc_ractor_newobj_cache_clear(rb_ractor_newobj_cache_t *newobj_cache)
}
}

void
rb_gc_force_recycle(VALUE obj)
{
/* no-op */
}

void
rb_gc_register_mark_object(VALUE obj)
{
Expand Down
16 changes: 0 additions & 16 deletions include/ruby/internal/gc.h
Expand Up @@ -209,22 +209,6 @@ void rb_gc_mark_movable(VALUE obj);
*/
VALUE rb_gc_location(VALUE obj);

/**
* Asserts that the passed object is no longer needed. Such objects are
* reclaimed sooner or later so this function is not mandatory. But sometimes
* you can know from your application knowledge that an object is surely dead
* at some point. Calling this as a hint can be a polite way.
*
* @param[out] obj Object, dead.
* @pre `obj` have never been passed to this function before.
* @post `obj` could be invalidated.
* @warning It is a failure to pass an object multiple times to this
* function.
* @deprecated This is now a no-op function.
*/
RBIMPL_ATTR_DEPRECATED(("this is now a no-op function"))
void rb_gc_force_recycle(VALUE obj);

/**
* Triggers a GC process. This was the only GC entry point that we had at the
* beginning. Over time our GC evolved. Now what this function does is just a
Expand Down

0 comments on commit dbe8886

Please sign in to comment.