mirror of
https://github.com/ruby/ruby.git
synced 2025-08-25 22:14:37 +02:00
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@6871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
23a4871368
commit
38bbb9673f
5 changed files with 277 additions and 65 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue