[前][次][番号順一覧][スレッド一覧][生データ]

yarv-diff:232

From: ko1 atdot.net
Date: 13 Feb 2006 12:23:53 -0000
Subject: [yarv-diff:232] r393 - in trunk: . yarvtest

Author: ko1
Date: 2006-02-13 21:23:53 +0900 (Mon, 13 Feb 2006)
New Revision: 393

Modified:
   trunk/
   trunk/ChangeLog
   trunk/test.rb
   trunk/vm.c
   trunk/yarvtest/test_class.rb
Log:
 r579@leremita:  ko1 | 2006-02-13 20:38:18 +0900
 	* vm.c : fix constant search bug ([yarv-dev:788])
 
 	* yarvtest/test_class.rb : add a test of [yarv-dev:788]
 



Property changes on: trunk
___________________________________________________________________
Name: svk:merge
   - 81cd9672-7512-7e48-ae48-6936450e977d:/local/yarv/trunk:577
   + 81cd9672-7512-7e48-ae48-6936450e977d:/local/yarv/trunk:579

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-02-13 09:10:56 UTC (rev 392)
+++ trunk/ChangeLog	2006-02-13 12:23:53 UTC (rev 393)
@@ -4,6 +4,13 @@
 #  from Mon, 03 May 2004 01:24:19 +0900
 #
 
+2006-02-13(Mon) 20:36:06 +0900  Koichi Sasada  <ko1 atdot.net>
+
+	* vm.c : fix constant search bug ([yarv-dev:788])
+
+	* yarvtest/test_class.rb : add a test of [yarv-dev:788]
+
+
 2006-02-13(Mon) 18:09:28 +0900  Koichi Sasada  <ko1 atdot.net>
 
 	* test/ruby/test_clone.rb : enable tests with Class#clone

Modified: trunk/test.rb
===================================================================
--- trunk/test.rb	2006-02-13 09:10:56 UTC (rev 392)
+++ trunk/test.rb	2006-02-13 12:23:53 UTC (rev 393)
@@ -1,4 +1,8 @@
 
+
+__END__
+
+
 module M
   class C
     def m

Modified: trunk/vm.c
===================================================================
--- trunk/vm.c	2006-02-13 09:10:56 UTC (rev 392)
+++ trunk/vm.c	2006-02-13 12:23:53 UTC (rev 393)
@@ -908,12 +908,13 @@
 
     if (klass == Qnil) {
 	/* in current lexical scope */
-	NODE *cref = get_cref(iseq, th->cfp->lfp);
+	NODE *root_cref = get_cref(iseq, th->cfp->lfp);
+	NODE *cref = root_cref;
 
 	while (cref && cref->nd_next) {
 	    klass = cref->nd_clss;
 	    cref = cref->nd_next;
-
+	    
 	    if (klass == 0) {
 		continue;
 	    }
@@ -944,7 +945,7 @@
 		}
 	    }
 	}
-	klass = cref->nd_clss;
+	klass = root_cref->nd_clss;
 	if (is_defined) {
 	    return rb_const_defined(klass, id);
 	}

Modified: trunk/yarvtest/test_class.rb
===================================================================
--- trunk/yarvtest/test_class.rb	2006-02-13 09:10:56 UTC (rev 392)
+++ trunk/yarvtest/test_class.rb	2006-02-13 12:23:53 UTC (rev 393)
@@ -596,5 +596,25 @@
       $a
     }
   end
+
+  def test_include
+    ae %q{
+      module M
+        class A
+          def hoge
+            "hoge"
+          end
+        end
+      end
+      
+      class A
+        include M
+        def m
+          [Module.nesting, A.new.hoge, instance_eval("A.new.hoge")]
+        end
+      end
+      A.new.m
+    }
+  end
 end
 


-- 
ML: yarv-diff quickml.atdot.net
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧][生データ]