From 6dc73d2517746f1913a9441e1a2bde8886acfdc9 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Fri, 4 Jul 2025 08:32:16 +0900 Subject: [PATCH] mruby-array-ext: unify array#- tests Merged the separate "Array#-" and "Array#- with large arrays" test blocks into a single comprehensive test. The unified test covers both basic functionality (type checking, simple subtraction) and the hash-based implementation for large arrays (>32 elements). Co-authored-by: Atlassian Rovo Dev --- mrbgems/mruby-array-ext/test/array.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mrbgems/mruby-array-ext/test/array.rb b/mrbgems/mruby-array-ext/test/array.rb index fec3e5ddc..91a7cdabf 100644 --- a/mrbgems/mruby-array-ext/test/array.rb +++ b/mrbgems/mruby-array-ext/test/array.rb @@ -74,6 +74,7 @@ assert("Array#uniq") do end assert("Array#-") do + # Test basic functionality a = [1, 2, 3, 1] b = [1] c = 1 @@ -81,9 +82,7 @@ assert("Array#-") do assert_raise(TypeError) { a - c } assert_equal [2, 3], (a - b) assert_equal [1, 2, 3, 1], a -end -assert("Array#- with large arrays") do # Test hash-based implementation (other_ary length > 32) a = (1..50).to_a b = (15..50).to_a # 36 elements > 32, triggers hash approach