Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`dig` throws a `TypeError` exception when `params[scope]` is set (e.g. to a string). Example this works: ```ruby params = { actor: { name: "Nicolas Cage" } } # digging with keys that don't exist params.dig(:foo, :bar) => nil # digging with keys that partially exist params.dig(:actor, :name, :whatever) => TypeError: String does not have #dig method ``` Full article: http://anamaria.martinezgomez.name/2018/01/07/ruby-dig.html Original discussion: https://bugs.ruby-lang.org/issues/11762
- Loading branch information