aboutsummaryrefslogtreecommitdiffstats
path: root/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/vm.c b/vm.c
index bddb4dd8d4..57cb090922 100644
--- a/vm.c
+++ b/vm.c
@@ -1780,6 +1780,17 @@ const rb_data_type_t ruby_thread_data_type = {
},
};
+VALUE
+rb_obj_is_thread(VALUE obj)
+{
+ if (rb_typeddata_is_kind_of(obj, &thread_data_type)) {
+ return Qtrue;
+ }
+ else {
+ return Qfalse;
+ }
+}
+
static VALUE
thread_alloc(VALUE klass)
{