aboutsummaryrefslogtreecommitdiffstats
path: root/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'object.c')
-rw-r--r--object.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/object.c b/object.c
index 4dad9b7491..9ec96687e9 100644
--- a/object.c
+++ b/object.c
@@ -309,6 +309,9 @@ special_object_p(VALUE obj)
case T_BIGNUM:
case T_FLOAT:
case T_SYMBOL:
+ case T_RATIONAL:
+ case T_COMPLEX:
+ /* not a comprehensive list */
return TRUE;
default:
return FALSE;
@@ -349,6 +352,13 @@ rb_obj_clone2(int argc, VALUE *argv, VALUE obj)
return immutable_obj_clone(obj, kwfreeze);
}
+VALUE
+rb_immutable_obj_clone(int argc, VALUE *argv, VALUE obj)
+{
+ int kwfreeze = freeze_opt(argc, argv);
+ return immutable_obj_clone(obj, kwfreeze);
+}
+
static int
freeze_opt(int argc, VALUE *argv)
{