summaryrefslogtreecommitdiff
path: root/ext/tk
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-12 14:20:51 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-12 14:20:51 +0000
commit1f828497d1e8df2b7b68ac2a093ab4439585d88a (patch)
tree6cf1bd0f1cc7921226608ccc133930aae49e7c82 /ext/tk
parentb53a183c009b3cb72b5964cf5652763b4cebf0f6 (diff)
* safe.c (rb_set_safe_level, safe_setter): raise an ArgumentError
when $SAFE is set to 4. $SAFE=4 is now obsolete. [ruby-core:55222] [Feature #8468] * object.c (rb_obj_untrusted, rb_obj_untrust, rb_obj_trust): Kernel#untrusted?, untrust, and trust are now deprecated. Their behavior is same as tainted?, taint, and untaint, respectively. * include/ruby/ruby.h (OBJ_UNTRUSTED, OBJ_UNTRUST): OBJ_UNTRUSTED() and OBJ_UNTRUST() are aliases of OBJ_TAINTED() and OBJ_TAINT(), respectively. * array.c, class.c, debug.c, dir.c, encoding.c, error.c, eval.c, ext/curses/curses.c, ext/dbm/dbm.c, ext/dl/cfunc.c, ext/dl/cptr.c, ext/dl/dl.c, ext/etc/etc.c, ext/fiddle/fiddle.c, ext/fiddle/pointer.c, ext/gdbm/gdbm.c, ext/readline/readline.c, ext/sdbm/init.c, ext/socket/ancdata.c, ext/socket/basicsocket.c, ext/socket/socket.c, ext/socket/udpsocket.c, ext/stringio/stringio.c, ext/syslog/syslog.c, ext/tk/tcltklib.c, ext/win32ole/win32ole.c, file.c, gc.c, hash.c, io.c, iseq.c, load.c, marshal.c, object.c, proc.c, process.c, random.c, re.c, safe.c, string.c, thread.c, transcode.c, variable.c, vm_insnhelper.c, vm_method.c, vm_trace.c: remove code for $SAFE=4. * test/dl/test_dl2.rb, test/erb/test_erb.rb, test/readline/test_readline.rb, test/readline/test_readline_history.rb, test/ruby/test_alias.rb, test/ruby/test_array.rb, test/ruby/test_dir.rb, test/ruby/test_encoding.rb, test/ruby/test_env.rb, test/ruby/test_eval.rb, test/ruby/test_exception.rb, test/ruby/test_file_exhaustive.rb, test/ruby/test_hash.rb, test/ruby/test_io.rb, test/ruby/test_method.rb, test/ruby/test_module.rb, test/ruby/test_object.rb, test/ruby/test_pack.rb, test/ruby/test_rand.rb, test/ruby/test_regexp.rb, test/ruby/test_settracefunc.rb, test/ruby/test_struct.rb, test/ruby/test_thread.rb, test/ruby/test_time.rb: remove tests for $SAFE=4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk')
-rw-r--r--ext/tk/tcltklib.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c
index a8cc122..d269f9c 100644
--- a/ext/tk/tcltklib.c
+++ b/ext/tk/tcltklib.c
@@ -1668,7 +1668,6 @@ set_eventloop_window_mode(self, mode)
VALUE self;
VALUE mode;
{
- rb_secure(4);
if (RTEST(mode)) {
window_event_mode = ~0;
@@ -1698,7 +1697,6 @@ set_eventloop_tick(self, tick)
int ttick = NUM2INT(tick);
int thr_crit_bup;
- rb_secure(4);
if (ttick < 0) {
rb_raise(rb_eArgError,
@@ -1765,7 +1763,6 @@ set_no_event_wait(self, wait)
{
int t_wait = NUM2INT(wait);
- rb_secure(4);
if (t_wait <= 0) {
rb_raise(rb_eArgError,
@@ -1819,7 +1816,6 @@ set_eventloop_weight(self, loop_max, no_event)
int lpmax = NUM2INT(loop_max);
int no_ev = NUM2INT(no_event);
- rb_secure(4);
if (lpmax <= 0 || no_ev <= 0) {
rb_raise(rb_eArgError, "weight parameters must be positive numbers");
@@ -1938,7 +1934,6 @@ static VALUE
lib_evloop_abort_on_exc_set(self, val)
VALUE self, val;
{
- rb_secure(4);
if (RTEST(val)) {
event_loop_abort_on_exc = 1;
} else if (NIL_P(val)) {
@@ -1955,7 +1950,6 @@ ip_evloop_abort_on_exc_set(self, val)
{
struct tcltkip *ptr = get_ip(self);
- rb_secure(4);
/* ip is deleted? */
if (deleted_ip(ptr)) {
@@ -6403,7 +6397,6 @@ ip_create_slave_core(interp, argc, argv)
safe = 1;
} else if (safemode == Qfalse || NIL_P(safemode)) {
safe = 0;
- /* rb_secure(4); */ /* already checked */
} else {
safe = 1;
}
@@ -6510,7 +6503,6 @@ ip_create_slave(argc, argv, self)
}
if (Tcl_IsSafe(master->ip) != 1
&& (safemode == Qfalse || NIL_P(safemode))) {
- rb_secure(4);
}
StringValue(name);
@@ -6717,7 +6709,6 @@ ip_allow_ruby_exit_set(self, val)
struct tcltkip *ptr = get_ip(self);
Tk_Window mainWin;
- rb_secure(4);
/* ip is deleted? */
if (deleted_ip(ptr)) {
@@ -7821,7 +7812,6 @@ lib_restart_core(interp, argc, argv)
struct tcltkip *ptr = get_ip(interp);
int thr_crit_bup;
- /* rb_secure(4); */ /* already checked */
/* tcl_stubs_check(); */ /* already checked */
@@ -7879,7 +7869,6 @@ lib_restart(self)
{
struct tcltkip *ptr = get_ip(self);
- rb_secure(4);
tcl_stubs_check();
@@ -7898,7 +7887,6 @@ ip_restart(self)
{
struct tcltkip *ptr = get_ip(self);
- rb_secure(4);
tcl_stubs_check();
@@ -9257,7 +9245,6 @@ ip_invoke_immediate(argc, argv, obj)
VALUE obj;
{
/* POTENTIALY INSECURE : can create infinite loop */
- rb_secure(4);
return ip_invoke_with_position(argc, argv, obj, TCL_QUEUE_HEAD);
}
@@ -10061,7 +10048,6 @@ create_dummy_encoding_for_tk_core(interp, name, error_mode)
{
get_ip(interp);
- rb_secure(4);
StringValue(name);
@@ -10519,7 +10505,6 @@ create_encoding_table_core(arg, interp)
Tcl_Obj **objv;
Tcl_Obj *enc_list;
- rb_secure(4);
/* set 'binary' encoding */
rb_hash_aset(table, ENCODING_NAME_BINARY, ENCODING_NAME_BINARY);
@@ -10555,7 +10540,6 @@ create_encoding_table_core(arg, interp)
VALUE interp;
{
volatile VALUE table = rb_hash_new();
- rb_secure(4);
rb_ivar_set(interp, ID_encoding_table, table);
return table;
}