summaryrefslogtreecommitdiff
path: root/doc/syntax/calling_methods.rdoc
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-10-03 13:14:45 -0700
committerJeremy Evans <code@jeremyevans.net>2019-10-03 14:13:27 -0700
commitc7715a4936a298ff9bcce97e65dfd3dc6f32f906 (patch)
treeb11311bd03442562078b9386c655aab4440461af /doc/syntax/calling_methods.rdoc
parent12e27a411c394366b3c701153040d63390d314cc (diff)
Add documentation regarding keyword argument separation [ci skip]
Diffstat (limited to 'doc/syntax/calling_methods.rdoc')
-rw-r--r--doc/syntax/calling_methods.rdoc5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/syntax/calling_methods.rdoc b/doc/syntax/calling_methods.rdoc
index ea2c49cf31..5abecc69da 100644
--- a/doc/syntax/calling_methods.rdoc
+++ b/doc/syntax/calling_methods.rdoc
@@ -279,6 +279,9 @@ hash at the end of the array into keyword arguments:
arguments = [1, 2, { c: 4 }]
my_method(*arguments)
+Note that this behavior is currently deprecated and will emit a warning.
+This behavior will be removed in Ruby 3.0.
+
You may also use the <code>**</code> (described next) to convert a Hash into
keyword arguments.
@@ -325,7 +328,7 @@ by <code>*</code>:
Prints:
- {:arguments=>[1, 2, {"3"=>4}], :keywords=>{:five=>6}}
+ {:arguments=>[1, 2], :keywords=>{'3'=>4, :five=>6}}
=== Proc to Block Conversion