summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-array-ext/test/array.rb
diff options
context:
space:
mode:
Diffstat (limited to 'mrbgems/mruby-array-ext/test/array.rb')
-rw-r--r--mrbgems/mruby-array-ext/test/array.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/mrbgems/mruby-array-ext/test/array.rb b/mrbgems/mruby-array-ext/test/array.rb
index 9a0f25f9a..3be17f187 100644
--- a/mrbgems/mruby-array-ext/test/array.rb
+++ b/mrbgems/mruby-array-ext/test/array.rb
@@ -36,6 +36,12 @@ assert("Array#uniq!") do
b = [ "a", "b", "c" ]
assert_nil b.uniq!
+
+ c = [["student","sam"], ["student","george"], ["teacher","matz"]]
+ assert_equal [["student", "sam"], ["teacher", "matz"]], c.uniq! { |s| s.first }
+
+ d = [["student","sam"], ["teacher","matz"]]
+ assert_nil d.uniq! { |s| s.first }
end
assert("Array#uniq") do