diff options
author | stomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-27 18:07:11 +0000 |
---|---|---|
committer | stomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-27 18:07:11 +0000 |
commit | c81188ef6c8eac11da4cdcbdcea789b40fc541ff (patch) | |
tree | f954383437a5c1a4a00a6ab81fb5263fbd15a2fd /struct.c | |
parent | 777d52280cd3d95c9f0efa5b503c7d4acbb4dd4e (diff) | |
download | ruby-c81188ef6c8eac11da4cdcbdcea789b40fc541ff.tar.gz |
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
Diffstat (limited to 'struct.c')
-rw-r--r-- | struct.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1130,15 +1130,15 @@ rb_struct_size(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 |