summaryrefslogtreecommitdiff
path: root/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal.h b/internal.h
index c59ccc5e19..edadce991a 100644
--- a/internal.h
+++ b/internal.h
@@ -1540,6 +1540,12 @@ VALUE rb_str2big_gmp(VALUE arg, int base, int badcheck);
/* error.c (export) */
int rb_bug_reporter_add(void (*func)(FILE *, void *), void *data);
+NORETURN(void rb_unexpected_type(VALUE,int));
+#undef Check_Type
+#define Check_Type(v, t) \
+ (!RB_TYPE_P((VALUE)(v), (t)) || \
+ ((t) == RUBY_T_DATA && RTYPEDDATA_P(v)) ? \
+ rb_unexpected_type((VALUE)(v), (t)) : (void)0)
/* file.c (export) */
#ifdef HAVE_READLINK