Ruby: ruby::backward Namespace Reference

Ruby 3.4.9p82 (2026-03-11 revision 76cca827ab52ab1d346a728f068d5b8da3e2952b)

Namespaces | Functions
ruby::backward Namespace Reference

Backwards compatibility layer. More...

## Namespaces
namespace | cxxanyargs
| Provides ANYARGS deprecation warnings.

## Functions
static VALUE | rb_iterate_deprecated (VALUE(*iter)(VALUE), VALUE data1, rb_block_call_func_t bl, VALUE data2)
| Old way to iterate a block.

## Detailed Description

Backwards compatibility layer.

## Function Documentation

## ◆ rb_iterate_deprecated()

VALUE ruby::backward::rb_iterate_deprecated | ( | VALUE(* | iter )(VALUE),
|  | VALUE | data1,
|  | rb_block_call_func_t | bl,
|  | VALUE | data2 )
| inlinestatic

Old way to iterate a block.

Deprecated
  This is an old API. Use rb_block_call() instead.

Warning
  The passed function must at least once call a ruby method (to handle interrupts etc.)

Parameters

  [in] | iter | A function that could yield a value.
  [in,out] | data1 | Passed to func1
  [in] | bl | A function acts as a block.
  [in,out] | data2 | Passed to proc as the data2 parameter.

Returns
  What func1 returns.

Definition at line 301 of file iterator.h.

Referenced by ruby::backward::cxxanyargs::rb_iterate().