summaryrefslogtreecommitdiffhomepage
path: root/mrblib/array.rb
diff options
context:
space:
mode:
Diffstat (limited to 'mrblib/array.rb')
-rw-r--r--mrblib/array.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/mrblib/array.rb b/mrblib/array.rb
index ae0868410..53d880660 100644
--- a/mrblib/array.rb
+++ b/mrblib/array.rb
@@ -84,8 +84,15 @@ class Array
end
def _inspect
- return "[]" if self.size == 0
- "["+self.map{|x|x.inspect}.join(", ")+"]"
+ size = self.size
+ return "[]" if size == 0
+ ary=[]
+ i=0
+ while i<size
+ ary<<self[i].inspect
+ i+=1
+ end
+ "["+ary.join(", ")+"]"
end
##
# Return the contents of this array as a string.