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

ruby-changes:6692

From: ko1 <ko1@a...>
Date: Fri, 25 Jul 2008 15:56:42 +0900 (JST)
Subject: [ruby-changes:6692] Ruby:r18208 (trunk): * vm.c (vm_invoke_proc): skip setting safe_level if

ko1	2008-07-25 15:56:23 +0900 (Fri, 25 Jul 2008)

  New Revision: 18208

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18208

  Log:
    * vm.c (vm_invoke_proc): skip setting safe_level if
      it from bmethod.  This change makes test/ruby/test_proc.rb pass.

  Modified files:
    trunk/ChangeLog
    trunk/vm.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 18207)
+++ ChangeLog	(revision 18208)
@@ -1,3 +1,8 @@
+Fri Jul 25 15:52:40 2008  Koichi Sasada  <ko1@a...>
+
+	* vm.c (vm_invoke_proc): skip setting safe_level if
+	  it from bmethod.  This change makes test/ruby/test_proc.rb pass.
+
 Fri Jul 25 10:00:00 2008  Martin Duerst  <duerst@i...>
 
 	* test/ruby/test_transcode.rb: refactoring/cleanup of
Index: vm.c
===================================================================
--- vm.c	(revision 18207)
+++ vm.c	(revision 18208)
@@ -513,7 +513,9 @@
 
     TH_PUSH_TAG(th);
     if ((state = EXEC_TAG()) == 0) {
-	th->safe_level = proc->safe_level;
+	if (!proc->is_from_method) {
+	    th->safe_level = proc->safe_level;
+	}
 	val = invoke_block_from_c(th, &proc->block, self, argc, argv, blockptr, 0);
     }
     TH_POP_TAG();

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

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