summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-06-12 12:19:25 +0900
committerYukihiro Matsumoto <[email protected]>2012-06-12 12:19:25 +0900
commitb32e586099d8a59bd497031f27e9763b028c0bad (patch)
tree13b4a63d486ed5b44b450bea6581de20b73d0b94 /test
parent46b098e0799f67915e4deb3bf7bdfb6d4d4bcf2d (diff)
downloadmruby-b32e586099d8a59bd497031f27e9763b028c0bad.tar.gz
mruby-b32e586099d8a59bd497031f27e9763b028c0bad.zip
should enhance test for Array#slice
Diffstat (limited to 'test')
-rw-r--r--test/t/array.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/t/array.rb b/test/t/array.rb
index 4e53f1120..1cfe02af7 100644
--- a/test/t/array.rb
+++ b/test/t/array.rb
@@ -222,7 +222,9 @@ assert('Array#size', '15.2.12.5.28') do
end
assert('Array#slice', '15.2.12.5.29') do
- [1,2,3].[](1) == 2
+ a = "12345".slice(1, 3)
+ b = a.slice(0)
+ "#{b}:" == "2:" and [1,2,3].[](1) == 2
end
assert('Array#unshift', '15.2.12.5.30') do