[前][次][番号順一覧][スレッド一覧]

ruby-changes:41592

From: nobu <ko1@a...>
Date: Wed, 27 Jan 2016 16:26:00 +0900 (JST)
Subject: [ruby-changes:41592] nobu:r53666 (trunk): Fix a Ruby-Doc comment for Array#dig

nobu	2016-01-27 16:26:53 +0900 (Wed, 27 Jan 2016)

  New Revision: 53666

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53666

  Log:
    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]

  Modified files:
    trunk/ChangeLog
    trunk/array.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 53665)
+++ ChangeLog	(revision 53666)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Jan 27 16:25:54 2016  Koichi ITO  <koic.ito@g...>
+
+	* 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@g...>
 
 	* array.c (permute0, rpermute0): [DOC] Substitute indexes ->
Index: array.c
===================================================================
--- array.c	(revision 53665)
+++ array.c	(revision 53666)
@@ -5527,7 +5527,7 @@ rb_ary_any_p(VALUE ary) https://github.com/ruby/ruby/blob/trunk/array.c#L5527
  *
  *   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
  */
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]