mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix a Ruby-Doc comment for Array#dig
* array.c (rb_ary_dig): [DOC] fix the exception class to be raised when intermediate object does not have dig method. TypeError will be raised now. [Fix GH-1224] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a82d27281b
commit
4df168074c
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
Wed Jan 27 16:25:54 2016 Koichi ITO <koic.ito@gmail.com>
|
||||
|
||||
* array.c (rb_ary_dig): [DOC] fix the exception class to be raised
|
||||
when intermediate object does not have dig method. TypeError
|
||||
will be raised now. [Fix GH-1224]
|
||||
|
||||
Tue Jan 26 19:36:15 2016 Aggelos Avgerinos <evaggelos.avgerinos@gmail.com>
|
||||
|
||||
* array.c (permute0, rpermute0): [DOC] Substitute indexes ->
|
||||
|
|
2
array.c
2
array.c
|
@ -5527,7 +5527,7 @@ rb_ary_any_p(VALUE ary)
|
|||
*
|
||||
* a.dig(0, 1, 1) #=> 3
|
||||
* a.dig(1, 2, 3) #=> nil
|
||||
* a.dig(0, 0, 0) #=> NoMethodError, undefined method `dig' for 1:Fixnum
|
||||
* a.dig(0, 0, 0) #=> TypeError: Fixnum does not have #dig method
|
||||
* [42, {foo: :bar}].dig(1, :foo) #=> :bar
|
||||
*/
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue