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

ruby-changes:58928

From: Jeremy <ko1@a...>
Date: Thu, 28 Nov 2019 08:15:37 +0900 (JST)
Subject: [ruby-changes:58928] f9debf3437 (master): Update documentation for ruby2_keywords [ci skip]

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

From f9debf343788a6460e1e67bd7efc470d73e69f21 Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@j...>
Date: Wed, 27 Nov 2019 15:13:35 -0800
Subject: Update documentation for ruby2_keywords [ci skip]


diff --git a/vm_method.c b/vm_method.c
index 5637251..9b34ce1 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -1769,7 +1769,7 @@ rb_mod_private(int argc, VALUE *argv, VALUE module) https://github.com/ruby/ruby/blob/trunk/vm_method.c#L1769
  *  a keyword splat.  It marks the method such that if the method is called
  *  with keyword arguments, the final hash argument is marked with a special
  *  flag such that if it is the final element of a normal argument splat to
- *  another method call, and that method calls does not include explicit
+ *  another method call, and that method call does not include explicit
  *  keywords or a keyword splat, the final element is interpreted as keywords.
  *  In other words, keywords will be passed through the method to other
  *  methods.
@@ -1779,8 +1779,10 @@ rb_mod_private(int argc, VALUE *argv, VALUE module) https://github.com/ruby/ruby/blob/trunk/vm_method.c#L1779
  *  2.7.
  *
  *  This method will probably be removed at some point, as it exists only
- *  for backwards compatibility, so always check that the module responds
- *  to this method before calling it.
+ *  for backwards compatibility. As it does not exist in Ruby versions
+ *  before 2.7, check that the module responds to this method before calling
+ *  it. Also, be aware that if this method is removed, the behavior of the
+ *  method will change so that it does not pass through keywords.
  *
  *    module Mod
  *      def foo(meth, *args, &block)
-- 
cgit v0.10.2


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

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