* [ruby-core:92059] [Ruby trunk Misc#15739] Improvements needed to documentation of `Hash#dig`, `Array#dig` and `OpenStruct#dig`
[not found] <redmine.issue-15739.20190330183925@ruby-lang.org>
@ 2019-03-30 18:39 ` cary
2019-10-25 20:19 ` [ruby-core:95551] [Ruby master Misc#15739] Improvements needed to documentation of Hash#dig, Array#dig and OpenStruct#dig ruby-core
1 sibling, 0 replies; 2+ messages in thread
From: cary @ 2019-03-30 18:39 UTC (permalink / raw
To: ruby-core
Issue #15739 has been reported by CaryInVictoria (Cary Swoveland).
----------------------------------------
Misc #15739: Improvements needed to documentation of `Hash#dig`, `Array#dig` and `OpenStruct#dig`
https://bugs.ruby-lang.org/issues/15739
* Author: CaryInVictoria (Cary Swoveland)
* Status: Open
* Priority: Normal
* Assignee:
----------------------------------------
The documentation of these three methods fails to explain how they interact. For example:
h = { a: [1,2,3] }
h.dig(:a, 1) #=> 2
`Hash#dig` is used first:
a = h.dig(:a) #=> [1,2,3]
Then `Array#dig` is invoked:
a.dig(1) #=> 2
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
* [ruby-core:95551] [Ruby master Misc#15739] Improvements needed to documentation of Hash#dig, Array#dig and OpenStruct#dig
[not found] <redmine.issue-15739.20190330183925@ruby-lang.org>
2019-03-30 18:39 ` [ruby-core:92059] [Ruby trunk Misc#15739] Improvements needed to documentation of `Hash#dig`, `Array#dig` and `OpenStruct#dig` cary
@ 2019-10-25 20:19 ` ruby-core
1 sibling, 0 replies; 2+ messages in thread
From: ruby-core @ 2019-10-25 20:19 UTC (permalink / raw
To: ruby-core
Issue #15739 has been updated by marcandre (Marc-Andre Lafortune).
Status changed from Open to Rejected
I find the documentation clear, and all three classes include mixed examples as in your example above.
----------------------------------------
Misc #15739: Improvements needed to documentation of Hash#dig, Array#dig and OpenStruct#dig
https://bugs.ruby-lang.org/issues/15739#change-82330
* Author: CaryInVictoria (Cary Swoveland)
* Status: Rejected
* Priority: Normal
* Assignee:
----------------------------------------
The documentation of these three methods fails to explain how they interact. For example:
h = { a: [1,2,3] }
h.dig(:a, 1) #=> 2
`Hash#dig` is used first:
a = h.dig(:a) #=> [1,2,3]
Then `Array#dig` is invoked:
a.dig(1) #=> 2
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-25 20:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <redmine.issue-15739.20190330183925@ruby-lang.org>
2019-03-30 18:39 ` [ruby-core:92059] [Ruby trunk Misc#15739] Improvements needed to documentation of `Hash#dig`, `Array#dig` and `OpenStruct#dig` cary
2019-10-25 20:19 ` [ruby-core:95551] [Ruby master Misc#15739] Improvements needed to documentation of Hash#dig, Array#dig and OpenStruct#dig ruby-core
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).