summaryrefslogtreecommitdiff
path: root/intern.h
diff options
context:
space:
mode:
Diffstat (limited to 'intern.h')
-rw-r--r--intern.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/intern.h b/intern.h
index 8a2916061b..92d41910a5 100644
--- a/intern.h
+++ b/intern.h
@@ -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));