diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-09-08 06:23:41 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-09-08 06:23:41 +0000 |
commit | 1d3fa4531991d8e2a7c4f698f4988e1f75d56b9b (patch) | |
tree | c50e8744a4c5ee877f4740dbb6f796b3f449e5aa /ext/tcltklib/tcltklib.c | |
parent | 4a962c6c911714be5ec6e8c877c4c01409ac80ef (diff) | |
download | ruby-1d3fa4531991d8e2a7c4f698f4988e1f75d56b9b.tar.gz ruby-1d3fa4531991d8e2a7c4f698f4988e1f75d56b9b.tar.xz ruby-1d3fa4531991d8e2a7c4f698f4988e1f75d56b9b.zip |
* ext/tcltklib/tcltklib.c (ip_init): cannot create a IP at level 4
* ext/tk/lib/multi-tk.rb: improve 'exit' operation, security check, and error treatment
* ext/tk/lib/multi-tk.rb: allow a trusted slave IP to create slave IPs.
* ext/tk/lib/tk/listbox.rb: add TkListbox#value, value=, clear, and erase
* ext/tk/lib/tk/text.rb: add TkText#clear and erase
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tcltklib/tcltklib.c')
-rw-r--r-- | ext/tcltklib/tcltklib.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c index b750e55d6..657c5765b 100644 --- a/ext/tcltklib/tcltklib.c +++ b/ext/tcltklib/tcltklib.c @@ -2848,6 +2848,11 @@ ip_init(argc, argv, self) int with_tk = 1; Tk_Window mainWin; + /* security check */ + if (ruby_safe_level >= 4) { + rb_raise(rb_eSecurityError, "Cannot create a TclTkIp object at level %d", ruby_safe_level); + } + /* create object */ Data_Get_Struct(self, struct tcltkip, ptr); ptr = ALLOC(struct tcltkip); |