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

ruby-changes:55614

From: Nobuyoshi <ko1@a...>
Date: Mon, 29 Apr 2019 15:12:56 +0900 (JST)
Subject: [ruby-changes:55614] Nobuyoshi Nakada:23375c8b81 (trunk): Make only `mesg` can be assigned with default `fname`

https://git.ruby-lang.org/ruby.git/commit/?id=23375c8b81

From 23375c8b81e07644517e5ad985b2fbf5e1b5d545 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Mon, 29 Apr 2019 13:42:50 +0900
Subject: Make only `mesg` can be assigned with default `fname`


diff --git a/test/lib/test/unit/assertions.rb b/test/lib/test/unit/assertions.rb
index caee3b1..51f89d5 100644
--- a/test/lib/test/unit/assertions.rb
+++ b/test/lib/test/unit/assertions.rb
@@ -500,7 +500,9 @@ EOT https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit/assertions.rb#L500
         end
       end
 
-      def prepare_syntax_check(code, fname = caller_locations(2, 1)[0], mesg = fname.to_s, verbose: nil)
+      def prepare_syntax_check(code, fname = nil, mesg = nil, verbose: nil)
+        fname ||= caller_locations(2, 1)[0]
+        mesg ||= fname.to_s
         verbose, $VERBOSE = $VERBOSE, verbose
         case
         when Array === fname
-- 
cgit v0.10.2


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

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