зеркало из https://github.com/github/ruby.git
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:
Родитель
cc80f139cd
Коммит
e71e83b021
|
@ -1,3 +1,8 @@
|
|||
Tue Oct 4 12:59:44 2016 Koichi ITO <koic.ito@gmail.com>
|
||||
|
||||
* array.c (rb_ary_dig): [DOC] update an example of error message
|
||||
by Array#dig, because of Integer Unification. [Fix GH-1455]
|
||||
|
||||
Tue Oct 4 09:55:12 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/bigdecimal/bigdecimal.c (BigDecimal_div2): need more room
|
||||
|
|
2
array.c
2
array.c
|
@ -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
|
||||
*/
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче