From: cary@... Date: 2019-03-30T18:39:26+00:00 Subject: [ruby-core:92059] [Ruby trunk Misc#15739] Improvements needed to documentation of `Hash#dig`, `Array#dig` and `OpenStruct#dig` 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/ Unsubscribe: