summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'object.c')
-rw-r--r--object.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/object.c b/object.c
index f1ab33c..d999c8c 100644
--- a/object.c
+++ b/object.c
@@ -58,6 +58,15 @@ rb_obj_hide(VALUE obj)
return obj;
}
+VALUE
+rb_obj_setup(VALUE obj, VALUE klass, VALUE type)
+{
+ RBASIC(obj)->flags = type;
+ RBASIC(obj)->klass = klass;
+ if (rb_safe_level() >= 3) FL_SET((obj), FL_TAINT | FL_UNTRUSTED);
+ return obj;
+}
+
/*
* call-seq:
* obj === other -> true or false