summaryrefslogtreecommitdiff
path: root/struct.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-12 15:51:23 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-12 15:51:23 +0000
commit53f013f4e17e4ae0df07f26c66beadc6414305cf (patch)
treec25c3b02c568902bdd71fd3aaff79cd4155b3802 /struct.c
parenta4a2254543a29b4601866f6ca9d36e0e73c98f2a (diff)
merge revision(s) 57735: [Backport #13148]
Fix doc for Hash#dig and Struct#dig * hash.c (rb_hash_dig): [DOC] correct argument name in method description; fix formatting in examples. * struct.c (rb_struct_dig): ditto. [ruby-core:79221] [Bug #13148] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/struct.c b/struct.c
index 6303436122..9289338a16 100644
--- a/struct.c
+++ b/struct.c
@@ -1136,15 +1136,15 @@ rb_struct_ptr(VALUE s)
* call-seq:
* struct.dig(key, ...) -> object
*
- * Extracts the nested value specified by the sequence of <i>idx</i>
+ * Extracts the nested value specified by the sequence of +key+
* objects by calling +dig+ at each step, returning +nil+ if any
* intermediate step is +nil+.
*
* klass = Struct.new(:a)
* o = klass.new(klass.new({b: [1, 2, 3]}))
*
- * o.dig(:a, :a, :b, 0) #=> 1
- * o.dig(:b, 0) #=> nil
+ * o.dig(:a, :a, :b, 0) #=> 1
+ * o.dig(:b, 0) #=> nil
*/
static VALUE