yarv-diff:171
From: ko1 atdot.net
Date: 25 Dec 2005 23:42:00 -0000
Subject: [yarv-diff:171] r330 - trunk
Author: ko1
Date: 2005-12-26 08:42:00 +0900 (Mon, 26 Dec 2005)
New Revision: 330
Modified:
trunk/ChangeLog
trunk/test.rb
trunk/vm.c
Log:
* vm.c (eval_get_ev_const) : fix to skip nil
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2005-12-25 23:29:50 UTC (rev 329)
+++ trunk/ChangeLog 2005-12-25 23:42:00 UTC (rev 330)
@@ -4,9 +4,14 @@
# from Mon, 03 May 2004 01:24:19 +0900
#
+2005-12-26(Mon) 08:40:02 +0900 Koichi Sasada <ko1 atdot.net>
+
+ * vm.c (eval_get_ev_const) : fix to skip nil
+
+
2005-12-26(Mon) 08:27:15 +0900 Koichi Sasada <ko1 atdot.net>
- * insnhelper.h : fix GET_CVAR_EV_KLASS
+ * insnhelper.h : fix GET_CVAR_EV_KLASS [yarv-dev:703]
2005-12-26(Mon) 07:51:01 +0900 Koichi Sasada <ko1 atdot.net>
Modified: trunk/test.rb
===================================================================
--- trunk/test.rb 2005-12-25 23:29:50 UTC (rev 329)
+++ trunk/test.rb 2005-12-25 23:42:00 UTC (rev 330)
@@ -1,15 +1,8 @@
Const = :top
class C
- Const = 1
- def initialize
- @@a = 1
- end
-end
-
-class C
+ Const = :C
def m
- @@cvar = 1
- p 1.instance_eval("@@cvar")
+ p 1.instance_eval("Const")
end
end
Modified: trunk/vm.c
===================================================================
--- trunk/vm.c 2005-12-25 23:29:50 UTC (rev 329)
+++ trunk/vm.c 2005-12-25 23:42:00 UTC (rev 330)
@@ -791,6 +791,9 @@
last_pos = RARRAY(cref)->len-1;
for(i = last_pos; i>0; i--){
klass = RARRAY(cref)->ptr[i];
+ if(NIL_P(klass)){
+ continue;
+ }
search_continue:
if(RCLASS(klass)->iv_tbl &&
st_lookup(RCLASS(klass)->iv_tbl, id, &val)){
--
ML: yarv-diff quickml.atdot.net
Info: http://www.atdot.net/~ko1/quickml