From 3cf4fe47e80548011c5c136c7447f24b587c40e6 Mon Sep 17 00:00:00 2001 From: tmm1 Date: Mon, 6 Jan 2014 19:38:20 +0000 Subject: array.c: return first unique element in Array#uniq * array.c (ary_add_hash): Fix consistency issue between Array#uniq and Array#uniq! [Bug #9340] [ruby-core:59457] * test/ruby/test_array.rb (class TestArray): regression test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- array.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'array.c') diff --git a/array.c b/array.c index c4869789e5..775fb243bd 100644 --- a/array.c +++ b/array.c @@ -3908,7 +3908,9 @@ ary_add_hash(VALUE hash, VALUE ary) for (i=0; i