Scala
scala> val lst=List(1,2,3)
lst: List[Int] = List(1, 2, 3)
scala> lst.mkString("|")
res17: String = 1|2|3
scala> lst.mkString("[", "|", "]")
res18: String = [1|2|3]
Ruby
>> array=[1,2,3]
=> [1, 2, 3]
>> array.join("|")
=> "1|2|3"
>> "[#{array.join("|")}]"
=> "[1|2|3]"
むむ。