Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
|
Declares rb_eval_string(). More...
Go to the source code of this file.
Macros | |
#define | rb_funcall2 rb_funcallv |
#define | rb_funcall3 rb_funcallv_public |
Declares rb_eval_string().
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. __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.
#define rb_funcall2 rb_funcallv |
#define rb_funcall3 rb_funcallv_public |
Definition at line 298 of file vm_eval.c.
References argc, argv, PASS_PASSED_BLOCK_HANDLER_EC, and RB_NO_KEYWORDS.
Definition at line 290 of file vm_eval.c.
References argc, argv, and PASS_PASSED_BLOCK_HANDLER_EC.
VALUE rb_current_receiver | ( | void | ) |
Definition at line 306 of file vm_eval.c.
References rb_execution_context_struct::cfp, rb_eRuntimeError, rb_raise(), and rb_control_frame_struct::self.
Evaluates the given string in an isolated binding.
Here "isolated" means the binding does not inherit any other binding. This behaves same as the binding for required libraries.
FILE will be "(eval)", and LINE starts from 1 in the evaluation.
str | Ruby code to evaluate. |
Exception | Raises an exception on error. |
Definition at line 1823 of file vm_eval.c.
References ruby_eval_string_from_file(), and str.
Evaluates the given string in an isolated binding.
FILE will be "(eval)", and LINE starts from 1 in the evaluation.
str | Ruby code to evaluate. |
state | Being set to zero if succeeded. Nonzero if an error occurred. |
Definition at line 1845 of file vm_eval.c.
References rb_protect(), and str.
Evaluates the given string under a module binding in an isolated binding.
This is same as the binding for loaded libraries on "load('foo', true)".
FILE will be "(eval)", and LINE starts from 1 in the evaluation.
str | Ruby code to evaluate. |
state | Being set to zero if succeeded. Nonzero if an error occurred. |
Definition at line 1877 of file vm_eval.c.
References rb_thread_struct::ec, EC_JUMP_TAG, eval_string_wrap_arg::klass, rb_extend_object(), rb_module_new(), rb_obj_clone(), rb_protect(), rb_vm_top_self(), str, eval_string_wrap_arg::str, TAG_NONE, rb_thread_struct::top_self, eval_string_wrap_arg::top_self, and rb_thread_struct::top_wrapper.
Calls a method.
recv | receiver of the method |
mid | an ID that represents the name of the method |
n | the number of arguments |
... | arbitrary number of method arguments |
Definition at line 1077 of file vm_eval.c.
References ALLOCA_N, argv, and rb_funcallv.
Referenced by default_inspect(), DupConfigPtr(), Init_generator(), Init_ossl_digest(), Init_syslog(), Init_win32ole_variant(), InitVM_Enumerator(), ossl_time_split(), ossl_to_der(), rb_callable_receiver(), rb_class_inherited(), rb_cmpint(), rb_eql(), rb_equal(), rb_fiddle_generic_to_value(), rb_hash_default_value(), rb_io_flush_raw(), rb_iseq_add_local_tracepoint_recursively(), rb_num_coerce_bin(), rb_num_coerce_cmp(), rb_num_coerce_relop(), rb_obj_as_string(), rb_obj_dup(), rb_obj_init_dup_clone(), rb_obj_not_equal(), rb_scheduler_block(), rb_scheduler_close(), rb_scheduler_io_read(), rb_scheduler_io_wait(), rb_scheduler_io_write(), rb_scheduler_kernel_sleep(), rb_scheduler_process_wait(), rb_scheduler_unblock(), rb_str_upto_each(), and ruby_num_interval_step_size().
Definition at line 1149 of file vm_eval.c.
References argc, argv, PASS_PASSED_BLOCK_HANDLER, and rb_funcallv_public().
VALUE rb_funcall_passing_block_kw | ( | VALUE | recv, |
ID | mid, | ||
int | argc, | ||
const VALUE * | argv, | ||
int | kw_splat | ||
) |
Definition at line 1156 of file vm_eval.c.
References argc, argv, CALL_PUBLIC, CALL_PUBLIC_KW, and PASS_PASSED_BLOCK_HANDLER.
VALUE rb_funcall_with_block_kw | ( | VALUE | recv, |
ID | mid, | ||
int | argc, | ||
const VALUE * | argv, | ||
VALUE | passed_procval, | ||
int | kw_splat | ||
) |
Definition at line 1173 of file vm_eval.c.
References argc, argv, CALL_PUBLIC, CALL_PUBLIC_KW, and NIL_P.
Referenced by rb_sym_proc_call().
Calls a method.
recv | receiver of the method |
mid | an ID that represents the name of the method |
argc | the number of arguments |
argv | pointer to an array of method arguments |
Definition at line 1024 of file vm_eval.c.
References argc, argv, and CALL_FCALL.
Definition at line 1030 of file vm_eval.c.
References argc, argv, CALL_FCALL, and CALL_FCALL_KW.
Referenced by rb_eval_cmd_kw(), rb_obj_call_init(), and rb_obj_call_init_kw().
Calls a method.
Same as rb_funcallv but this function can call only public methods.
recv | receiver of the method |
mid | an ID that represents the name of the method |
argc | the number of arguments |
argv | pointer to an array of method arguments |
Definition at line 1137 of file vm_eval.c.
References argc, argv, and CALL_PUBLIC.
Referenced by rb_funcall_passing_block(), rb_funcall_with_block(), and rb_random_ulong_limited().