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

yarv-diff:224

From: ko1 atdot.net
Date: 11 Feb 2006 14:43:26 -0000
Subject: [yarv-diff:224] r381 - trunk

Author: ko1
Date: 2006-02-11 23:43:26 +0900 (Sat, 11 Feb 2006)
New Revision: 381

Modified:
   trunk/
   trunk/ChangeLog
   trunk/insns.def
   trunk/test.rb
   trunk/thread.c
Log:
 r556@leremita:  ko1 | 2006-02-11 23:43:06 +0900
 	* insns.def (methoddef) : fix method declaration in method
 
 	* thread.c : Thread.critical to show warning (no effect)
 



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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-02-11 11:22:05 UTC (rev 380)
+++ trunk/ChangeLog	2006-02-11 14:43:26 UTC (rev 381)
@@ -4,6 +4,13 @@
 #  from Mon, 03 May 2004 01:24:19 +0900
 #
 
+2006-02-11(Sat) 23:41:11 +0900  Koichi Sasada  <ko1 atdot.net>
+
+	* insns.def (methoddef) : fix method declaration in method
+
+	* thread.c : Thread.critical to show warning (no effect)
+
+
 2006-02-11(Sat) 20:20:18 +0900  Koichi Sasada  <ko1 atdot.net>
 
 	* insns.def : fix [yarv-dev:831]

Modified: trunk/insns.def
===================================================================
--- trunk/insns.def	2006-02-11 11:22:05 UTC (rev 380)
+++ trunk/insns.def	2006-02-11 14:43:26 UTC (rev 381)
@@ -825,21 +825,22 @@
   //debugp_(-1, "self", GET_SELF());
   //printf("%s\n", body_name(nd_type(newbody)));
   //fflush(stdout);
-  
-  if(GET_ISEQ()->local_iseq->type == ISEQ_TYPE_METHOD){
+
+  if(GET_ISEQ()->type == ISEQ_TYPE_METHOD){
+    noex = NOEX_PUBLIC;
     klass = CLASS_OF(GET_SELF());
   }
   else{
     klass = GET_KLASS();
   }
-  
+
   rb_add_method(klass, id, newbody, noex);
 
   if(noex == NOEX_MODFUNC){
     rb_add_method(rb_singleton_class(klass),
                   id, newbody, NOEX_PUBLIC);
   }
-  
+
   INC_VM_STATE_VERSION();
 }
 

Modified: trunk/test.rb
===================================================================
--- trunk/test.rb	2006-02-11 11:22:05 UTC (rev 380)
+++ trunk/test.rb	2006-02-11 14:43:26 UTC (rev 381)
@@ -1,7 +1,23 @@
-1::A = 1
+class A
+  def m
+    def a
+      puts "OK"
+    end
+  end
+end
 
+a = A.new
+a.m
+a.a
 __END__
+require 'open-uri'
 
+open('http://www.atdot.net/yarv/'){|f|
+  p f.read
+}
+
+__END__
+
 begin
   require 'thread'
 rescue LoadError

Modified: trunk/thread.c
===================================================================
--- trunk/thread.c	2006-02-11 11:22:05 UTC (rev 380)
+++ trunk/thread.c	2006-02-11 14:43:26 UTC (rev 381)
@@ -455,6 +455,12 @@
   }
 }
 
+static VALUE
+rb_thread_s_critical(VALUE self)
+{
+  rb_warn("Thread.critical is not supported");
+  return Qnil;
+}
 
 /*
  *  call-seq:
@@ -1857,7 +1863,9 @@
   rb_define_singleton_method(cYarvThread, "current", yarv_thread_s_current, 0);
   rb_define_singleton_method(cYarvThread, "pass", yarv_thread_s_pass, 0);
   rb_define_singleton_method(cYarvThread, "list", rb_thread_list, 0);
-
+  rb_define_singleton_method(cYarvThread, "critical", rb_thread_s_critical, 0);
+  rb_define_singleton_method(cYarvThread, "critical=", rb_thread_s_critical, 1);
+  
   rb_define_method(cYarvThread, "raise", yarv_thread_raise_m, -1);
   rb_define_method(cYarvThread, "join", yarv_thread_join, -1);
   rb_define_method(cYarvThread, "value", yarv_thread_value, 0);


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

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