array.c: update Array#dig doc

* array.c (rb_ary_dig): [DOC] update an example of error message
  by Array#dig, because of Integer Unification.  [Fix GH-1455]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-10-04 03:59:46 +00:00
parent cc80f139cd
commit e71e83b021
2 changed files with 6 additions and 1 deletions

View file

@ -5665,7 +5665,7 @@ rb_ary_any_p(VALUE ary)
*
* a.dig(0, 1, 1) #=> 3
* a.dig(1, 2, 3) #=> nil
* a.dig(0, 0, 0) #=> TypeError: Fixnum does not have #dig method
* a.dig(0, 0, 0) #=> TypeError: Integer does not have #dig method
* [42, {foo: :bar}].dig(1, :foo) #=> :bar
*/