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

ruby-changes:36380

From: nobu <ko1@a...>
Date: Sun, 16 Nov 2014 19:11:44 +0900 (JST)
Subject: [ruby-changes:36380] nobu:r48461 (trunk): ext/-test-/proc/super.c: rename

nobu	2014-11-16 19:11:28 +0900 (Sun, 16 Nov 2014)

  New Revision: 48461

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

  Log:
    ext/-test-/proc/super.c: rename
    
    * ext/-test-/proc/super.c: renamed the file and maker method.
      [Feature #10195]

  Added files:
    trunk/ext/-test-/proc/super.c
  Removed files:
    trunk/ext/-test-/proc/call_super.c
  Modified files:
    trunk/test/-ext-/proc/test_bmethod.rb
Index: ext/-test-/proc/call_super.c
===================================================================
--- ext/-test-/proc/call_super.c	(revision 48460)
+++ ext/-test-/proc/call_super.c	(revision 48461)
@@ -1,28 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/ext/-test-/proc/call_super.c#L0
-#include "ruby.h"
-
-static VALUE
-bug_proc_call_super(RB_BLOCK_CALL_FUNC_ARGLIST(yieldarg, procarg))
-{
-    VALUE args[2];
-    VALUE ret;
-    args[0] = yieldarg;
-    args[1] = procarg;
-    ret = rb_call_super(2, args);
-    if (!NIL_P(blockarg)) {
-	ret = rb_proc_call(blockarg, ret);
-    }
-    return ret;
-}
-
-static VALUE
-bug_proc_make_caller(VALUE self, VALUE procarg)
-{
-    return rb_proc_new(bug_proc_call_super, procarg);
-}
-
-void
-Init_call_super(VALUE klass)
-{
-    rb_define_method(klass, "call_super", bug_proc_call_super, 1);
-    rb_define_singleton_method(klass, "make_caller", bug_proc_make_caller, 1);
-}
Index: ext/-test-/proc/super.c
===================================================================
--- ext/-test-/proc/super.c	(revision 0)
+++ ext/-test-/proc/super.c	(revision 48461)
@@ -0,0 +1,27 @@ https://github.com/ruby/ruby/blob/trunk/ext/-test-/proc/super.c#L1
+#include "ruby.h"
+
+static VALUE
+bug_proc_call_super(RB_BLOCK_CALL_FUNC_ARGLIST(yieldarg, procarg))
+{
+    VALUE args[2];
+    VALUE ret;
+    args[0] = yieldarg;
+    args[1] = procarg;
+    ret = rb_call_super(2, args);
+    if (!NIL_P(blockarg)) {
+	ret = rb_proc_call(blockarg, ret);
+    }
+    return ret;
+}
+
+static VALUE
+bug_proc_make_call_super(VALUE self, VALUE procarg)
+{
+    return rb_proc_new(bug_proc_call_super, procarg);
+}
+
+void
+Init_super(VALUE klass)
+{
+    rb_define_singleton_method(klass, "make_call_super", bug_proc_make_call_super, 1);
+}

Property changes on: ext/-test-/proc/super.c
___________________________________________________________________
Added: svn:eol-style
   + LF

Index: test/-ext-/proc/test_bmethod.rb
===================================================================
--- test/-ext-/proc/test_bmethod.rb	(revision 48460)
+++ test/-ext-/proc/test_bmethod.rb	(revision 48461)
@@ -14,7 +14,7 @@ class TestProc::TestBMethod https://github.com/ruby/ruby/blob/trunk/test/-ext-/proc/test_bmethod.rb#L14
   end
 
   class Bound < Base
-    define_method(:foo, Bug::Proc.make_caller(42))
+    define_method(:foo, Bug::Proc.make_call_super(42))
   end
 
   def test_super_in_bmethod

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

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