[前][次][番号順一覧][スレッド一覧]

ruby-changes:6070

From: matz <ko1@a...>
Date: Thu, 26 Jun 2008 17:51:00 +0900 (JST)
Subject: [ruby-changes:6070] Ruby:r17581 (ruby_1_8): * eval.c (rb_call0): wrong condition to check insecure method.

matz	2008-06-26 17:50:47 +0900 (Thu, 26 Jun 2008)

  New Revision: 17581

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/eval.c

  Log:
    * eval.c (rb_call0): wrong condition to check insecure method.
      a patch from Keita Yamaguchi <keita.yamaguchi at gmail.com>.

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=17581&r2=17580&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/eval.c?r1=17581&r2=17580&diff_format=u

Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 17580)
+++ ruby_1_8/ChangeLog	(revision 17581)
@@ -3,6 +3,9 @@
 	* variable.c (rb_f_trace_var): should not be allowed at safe level 4.  
 	  a patch from Keita Yamaguchi <keita.yamaguchi at gmail.com>.
 
+	* eval.c (rb_call0): wrong condition to check insecure method.
+	  a patch from Keita Yamaguchi <keita.yamaguchi at gmail.com>.
+
 Wed Jun 25 18:54:54 2008  NAKAMURA Usaku  <usa@r...>
 
 	* lib/{cgi-lib,getopts,importenv}.rb: check caller[0] because when
Index: ruby_1_8/eval.c
===================================================================
--- ruby_1_8/eval.c	(revision 17580)
+++ ruby_1_8/eval.c	(revision 17581)
@@ -5828,8 +5828,7 @@
     TMP_PROTECT;
     volatile int safe = -1;
 
-    if (NOEX_SAFE(flags) > ruby_safe_level &&
-	ruby_safe_level == 0 && NOEX_SAFE(flags) > 2) {
+    if (NOEX_SAFE(flags) > ruby_safe_level && NOEX_SAFE(flags) > 2) {
 	rb_raise(rb_eSecurityError, "calling insecure method: %s",
 		 rb_id2name(id));
     }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]