Ruby: ruby::backward Namespace Reference

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

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()

static 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().