summaryrefslogtreecommitdiff
path: root/ext/tk
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk')
-rw-r--r--ext/tk/tcltklib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c
index 4a1d3b8317..40d546ea9d 100644
--- a/ext/tk/tcltklib.c
+++ b/ext/tk/tcltklib.c
@@ -6134,6 +6134,9 @@ ip_init(argc, argv, self)
/* create object */
TypedData_Get_Struct(self, struct tcltkip, &tcltkip_type, ptr);
+ if (DATA_PTR(self)) {
+ rb_raise(rb_eArgError, "already initialized interpreter");
+ }
ptr = ALLOC(struct tcltkip);
/* ptr = RbTk_ALLOC_N(struct tcltkip, 1); */
DATA_PTR(self) = ptr;