[ruby-core:95551] [Ruby master Misc#15739] Improvements needed to documentation of Hash#dig, Array#dig and OpenStruct#dig
From:
ruby-core@...
Date:
2019-10-25 20:19:08 UTC
List:
ruby-core #95551
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/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>