From 750a639eab6e0c5615cd7651c1ab4215a8247ef7 Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Thu, 21 Jun 2012 11:43:03 +0900 Subject: Add test for Array#to_s and Array#inspect. --- test/t/array.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/t/array.rb b/test/t/array.rb index 1cfe02af7..3f441c1cc 100644 --- a/test/t/array.rb +++ b/test/t/array.rb @@ -234,4 +234,12 @@ assert('Array#unshift', '15.2.12.5.30') do a == [1,2,3] and b == [1,2,3] end +assert('Array#to_s', '15.2.12.5.31') do + a = [2, 3, 4, 5] + r1 = a.to_s + r2 = a.inspect + + r1 == r2 and r1 == "[2, 3, 4, 5]" +end + # Not ISO specified -- cgit v1.2.3