Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/main2.rb
Instance Method Summary collapse
Instance Method Details
#to_s ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/main2.rb', line 15 def to_s result="[" self.each do |x| result << x.to_s << "," end result=result[0..-2] result << "]" return result end |