Ruby: include/ruby/internal/intern/eval.h File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Functions
eval.h File Reference

Pre-1.9 era evaluator APIs (now considered miscellaneous). More...

`#include "ruby/internal/attr/noreturn.h"`
`#include "ruby/internal/dllexport.h"`
`#include "ruby/internal/value.h"`

Go to the source code of this file.

## Functions
void | rb_exc_raise (VALUE)
| Raises an exception in the current thread. More...
void | rb_exc_fatal (VALUE)
| Raises a fatal error in the current thread. More...
VALUE | rb_f_exit (int, const VALUE *)
VALUE | rb_f_abort (int, const VALUE *)
void | rb_interrupt (void)
| Raises an `Interrupt` exception. More...
ID | rb_frame_this_func (void)
| The original name of the current method. More...
void | rb_jump_tag (int)
| Continues the exception caught by rb_protect() and rb_eval_string_protect(). More...
void | rb_obj_call_init (VALUE, int, const VALUE *)
| Calls `initialize` method of obj with the given arguments. More...
void | rb_obj_call_init_kw (VALUE, int, const VALUE *, int)
VALUE | rb_protect (VALUE(*)(VALUE), VALUE, int *)
| Protects a function call from potential global escapes from the function. More...
ID | rb_frame_callee (void)
| The name of the current method. More...
VALUE | rb_make_exception (int, const VALUE *)
| Make an `Exception` object from the list of arguments in a manner similar to `Kernel#raise`. More...
void | rb_set_end_proc (void(*)(VALUE), VALUE)

## Detailed Description

Pre-1.9 era evaluator APIs (now considered miscellaneous).

Author
  Ruby developers ruby-.nosp@m.core.nosp@m.@ruby.nosp@m.-lan.nosp@m.g.org

Copyright
  This file is a part of the programming language Ruby. Permission is hereby granted, to either redistribute and/or modify this file, provided that the conditions mentioned in the file COPYING are met. Consult the file for details.

Warning
  Symbols prefixed with either `RBIMPL` or `rbimpl` are implementation details. Don't take them as canon. They could rapidly appear then vanish. The name (path) of this header file is also an implementation detail. Do not expect it to persist at the place it is now. Developers are free to move it anywhere anytime at will.

Note
  To ruby-core: remember that this header can be possibly recursively included from extension libraries written in C++. Do not expect for instance `__VA_ARGS__` is always available. We assume C99 for ruby itself but we don't assume languages of extension libraries. They could be written in C++98.

Definition in file eval.h.

## Function Documentation

## ◆ rb_f_abort()

VALUE rb_f_abort | ( | int | argc,
|  | const VALUE * | argv
| ) |  |

Definition at line 4494 of file process.c.

References argc, argv, EXIT_FAILURE, INT2NUM, NIL_P, Qnil, rb_check_arity, rb_class_new_instance(), rb_ec_error_print(), rb_ec_get_errinfo(), rb_eSystemExit, rb_exc_raise(), rb_exit(), rb_io_puts(), rb_ractor_stderr(), StringValue, and UNREACHABLE_RETURN.

## ◆ rb_f_exit()

VALUE rb_f_exit | ( | int | argc,
|  | const VALUE * | argv
| ) |  |

Definition at line 4429 of file process.c.

References argc, argv, EXIT_SUCCESS, Qnil, rb_check_arity, rb_exit(), and UNREACHABLE_RETURN.

## ◆ rb_obj_call_init_kw()

void rb_obj_call_init_kw | ( | VALUE | obj,
|  | int | argc,
|  | const VALUE * | argv,
|  | int | kw_splat
| ) |  |

Definition at line 1717 of file eval.c.

References argc, argv, PASS_PASSED_BLOCK_HANDLER, and rb_funcallv_kw().

Referenced by rb_class_new_instance(), rb_class_new_instance_kw(), and rb_class_new_instance_pass_kw().

## ◆ rb_set_end_proc()

void rb_set_end_proc | ( | void(*)(VALUE) | func,
|  | VALUE | data
| ) |  |

Definition at line 59 of file eval_jump.c.

References ALLOC, end_proc_data::data, end_proc_data::func, link(), and rb_thread_struct::top_wrapper.