diff options
Diffstat (limited to 'intern.h')
-rw-r--r-- | intern.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -128,6 +128,14 @@ VALUE rb_singleton_class _((VALUE)); int rb_cmpint _((VALUE, VALUE, VALUE)); NORETURN(void rb_cmperr _((VALUE, VALUE))); /* enum.c */ +VALUE rb_block_call _((VALUE, ID, int, VALUE*, VALUE (*)(ANYARGS), VALUE)); +/* enumerator.c */ +VALUE rb_enumeratorize _((VALUE, VALUE, int, VALUE *)); +#define RETURN_ENUMERATOR(obj, argc, argv) do { \ + if (!rb_block_given_p()) \ + return rb_enumeratorize(obj, ID2SYM(rb_frame_last_func()), \ + argc, argv); \ + } while (0) /* error.c */ RUBY_EXTERN int ruby_nerrs; VALUE rb_exc_new _((VALUE, const char*, long)); |