summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hash.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hash.c b/hash.c
index 25ab995..23b01e8 100644
--- a/hash.c
+++ b/hash.c
@@ -1326,13 +1326,14 @@ rb_hash_reject(VALUE hash)
/*
* call-seq:
- * hsh.slice -> a_hash
+ * hsh.slice(*keys) -> a_hash
*
* Slices a hash to include only the given keys.
* Returns a hash containing the given keys.
*
* h = { "a" => 100, "b" => 200, "c" => 300 }
- * h.slice("a") #=> {"a" => 100}
+ * h.slice("a") #=> {"a"=>100}
+ * h.slice("c", "d") #=> {"c"=>300}
*/
static VALUE