diff --git a/ChangeLog b/ChangeLog index f1235e4f9a..19c5c82cb3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Fri May 15 18:28:20 2015 Nobuyoshi Nakada + + * array.c (rb_ary_assoc, rb_ary_rassoc): [DOC] the result when key + was found is the existing element, not a new array. reported by + Giau Nguyen . + Fri May 15 08:24:28 2015 Takeyuki FUJIOKA * lib/cgi/cookie.rb: Implement HttpOnly flag for cookies. diff --git a/array.c b/array.c index 0988a21888..32f9f9ebe4 100644 --- a/array.c +++ b/array.c @@ -3692,7 +3692,7 @@ rb_ary_times(VALUE ary, VALUE times) /* * call-seq: - * ary.assoc(obj) -> new_ary or nil + * ary.assoc(obj) -> element_ary or nil * * Searches through an array whose elements are also arrays comparing +obj+ * with the first element of each contained array using obj.==. @@ -3727,7 +3727,7 @@ rb_ary_assoc(VALUE ary, VALUE key) /* * call-seq: - * ary.rassoc(obj) -> new_ary or nil + * ary.rassoc(obj) -> element_ary or nil * * Searches through the array whose elements are also arrays. *