summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-27 07:26:53 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-27 07:26:53 (GMT)
commit4df168074c9e80822b4326a4539600ae7dbe0adb (patch)
treee16940d085b9b38585c6aafa660f8abecd20e9f3 /array.c
parenta82d27281bbec329cec62448dd62a18df6115358 (diff)
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
Diffstat (limited to 'array.c')
-rw-r--r--array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/array.c b/array.c
index ca10789..5f4bfc6 100644
--- a/array.c
+++ b/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
*/