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

ruby-changes:41651

From: nobu <ko1@a...>
Date: Wed, 3 Feb 2016 16:21:55 +0900 (JST)
Subject: [ruby-changes:41651] nobu:r53725 (trunk): vm_eval.c: argument names

nobu	2016-02-03 16:21:48 +0900 (Wed, 03 Feb 2016)

  New Revision: 53725

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

  Log:
    vm_eval.c: argument names
    
    * vm_eval.c (make_no_method_exception): enumerate argument
      meanings instead of a magic number.

  Modified files:
    trunk/vm_eval.c
Index: vm_eval.c
===================================================================
--- vm_eval.c	(revision 53724)
+++ vm_eval.c	(revision 53725)
@@ -685,7 +685,13 @@ static VALUE https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L685
 make_no_method_exception(VALUE exc, VALUE format, VALUE obj, int argc, const VALUE *argv)
 {
     int n = 0;
-    VALUE args[3];
+    enum {
+	arg_mesg,
+	arg_name,
+	arg_args,
+	args_size
+    };
+    VALUE args[args_size];
 
     if (!format) {
 	format = rb_fstring_cstr("undefined method `%s' for %s%s%s");

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

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