mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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/trunk@57735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6d3654d59b
commit
6b82ba9e26
2 changed files with 9 additions and 9 deletions
2
hash.c
2
hash.c
|
@ -2862,7 +2862,7 @@ rb_hash_any_p(VALUE hash)
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* hsh.dig(key, ...) -> object
|
* hsh.dig(key, ...) -> object
|
||||||
*
|
*
|
||||||
* Extracts the nested value specified by the sequence of <i>idx</i>
|
* Extracts the nested value specified by the sequence of <i>key</i>
|
||||||
* objects by calling +dig+ at each step, returning +nil+ if any
|
* objects by calling +dig+ at each step, returning +nil+ if any
|
||||||
* intermediate step is +nil+.
|
* intermediate step is +nil+.
|
||||||
*
|
*
|
||||||
|
|
2
struct.c
2
struct.c
|
@ -1130,7 +1130,7 @@ rb_struct_size(VALUE s)
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* struct.dig(key, ...) -> object
|
* 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
|
* objects by calling +dig+ at each step, returning +nil+ if any
|
||||||
* intermediate step is +nil+.
|
* intermediate step is +nil+.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue