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

ruby-changes:55464

From: svn <ko1@a...>
Date: Mon, 22 Apr 2019 09:55:31 +0900 (JST)
Subject: [ruby-changes:55464] svn:r44a468ccda (trunk): * remove trailing spaces.

svn	2019-04-22 09:55:20 +0900 (Mon, 22 Apr 2019)

  New Revision: 44a468ccda

  https://git.ruby-lang.org/ruby.git/commit/?id=44a468ccda

  Log:
    * remove trailing spaces.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

  Modified files:
    README.md
Index: v1_1r/eval.c
===================================================================
--- v1_1r/eval.c	(revision 43)
+++ v1_1r/eval.c	(revision 44)
@@ -2117,7 +2117,7 @@ rb_eval(self, node) https://github.com/ruby/ruby/blob/trunk/v1_1r/eval.c#L2117
 		rb_clear_cache_by_id(node->nd_mid);
 	    }
 
-	    if (FL_TEST(the_scope,SCOPE_PRIVATE)) {
+	    if (FL_TEST(the_scope,SCOPE_PRIVATE) || node->nd_mid == init) {
 		noex = NOEX_PRIVATE;
 	    }
 	    else {
@@ -2127,9 +2127,6 @@ rb_eval(self, node) https://github.com/ruby/ruby/blob/trunk/v1_1r/eval.c#L2127
 	    if (FL_TEST(the_scope,SCOPE_MODFUNC)) {
 		rb_add_method(rb_singleton_class(the_class),
 			      node->nd_mid, node->nd_defn, NOEX_PUBLIC);
-	    }
-
-	    if (FL_TEST(the_scope, SCOPE_MODFUNC)) {
 		rb_funcall(the_class, rb_intern("singleton_method_added"),
 			   1, INT2FIX(node->nd_mid));
 	    }
Index: v1_1r/ChangeLog
===================================================================
--- v1_1r/ChangeLog	(revision 43)
+++ v1_1r/ChangeLog	(revision 44)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/v1_1r/ChangeLog#L1
+Thu Jan 22 00:37:47 1998  Yukihiro Matsumoto  <matz@n...>
+
+	* class.c (rb_define_method): `initialize' should always be
+	  private, even if it defined by C extensions.
+
+	* eval.c (rb_eval): `initialize' should always be private.
+
 Thu Jan 22 16:21:08 1998  Yukihiro Matsumoto  <matz@n...>
 
 	* eval.c (rb_eval): some singleton class def cause SEGV.
@@ -10,7 +17,8 @@ Wed Jan 21 01:43:42 1998  Yukihiro Matsu https://github.com/ruby/ruby/blob/trunk/v1_1r/ChangeLog#L17
 	* eval.c (PUSH_FRAME): do not use ALLOCA_N().  crash on some
 	  platforms that use missing/alloca.c.
 
-	* regex.c (re_compile_pattern): too many pops for non register subexpr.
+	* regex.c (re_compile_pattern): too many pops for non register
+	  subexpr.
 
 	* parse.y (yylex): open parentheses after identifiers are argument 
 	  list, even if whitespaces have seen.
Index: v1_1r/class.c
===================================================================
--- v1_1r/class.c	(revision 43)
+++ v1_1r/class.c	(revision 44)
@@ -419,25 +419,29 @@ rb_define_method(klass, name, func, argc https://github.com/ruby/ruby/blob/trunk/v1_1r/class.c#L419
     VALUE (*func)();
     int argc;
 {
-    rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PUBLIC);
+    ID id = rb_intern(name);
+
+    rb_add_method(klass, id, NEW_CFUNC(func, argc), 
+		  (name[0] == 'i' && id == rb_intern("initialize"))?
+		  NOEX_PRIVATE:NOEX_PUBLIC);
 }
 
 void
-rb_undef_method(klass, name)
+rb_define_private_method(klass, name, func, argc)
     VALUE klass;
     char *name;
+    VALUE (*func)();
+    int argc;
 {
-    rb_add_method(klass, rb_intern(name), 0, NOEX_PUBLIC);
+    rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PRIVATE);
 }
 
 void
-rb_define_private_method(klass, name, func, argc)
+rb_undef_method(klass, name)
     VALUE klass;
     char *name;
-    VALUE (*func)();
-    int argc;
 {
-    rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PRIVATE);
+    rb_add_method(klass, rb_intern(name), 0, NOEX_PUBLIC);
 }
 
 VALUE
Index: v1_1r/ext/gtk/gtk.c
===================================================================
--- v1_1r/ext/gtk/gtk.c	(revision 43)
+++ v1_1r/ext/gtk/gtk.c	(revision 44)
@@ -5246,7 +5246,6 @@ Init_gtk() https://github.com/ruby/ruby/blob/trunk/v1_1r/ext/gtk/gtk.c#L5246
 
     /* GtkObject */
     rb_define_method(gObject, "initialize", gobj_initialize, -1);
-    rb_define_method(gObject, "initialize", gobj_initialize, -1);
     rb_define_method(gObject, "set_flags", gobj_set_flags, 1);
     rb_define_method(gObject, "unset_flags", gobj_unset_flags, 1);
     rb_define_method(gObject, "destroy", gobj_destroy, 0);
Index: v1_1r/ext/Setup
===================================================================
--- v1_1r/ext/Setup	(revision 43)
+++ v1_1r/ext/Setup	(revision 44)
@@ -10,4 +10,4 @@ https://github.com/ruby/ruby/blob/trunk/v1_1r/ext/Setup#L10
 #socket
 #tkutil
 #tcltklib
-gtk
+#gtk

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

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