a.slice(1...(a.size - 1)).split(",").map(&:strip).map(&:to_i). else. raise "Not an array like string". end. p result # => [1, 2, 3, 4]. p result[0] # => 1.
確定! 回上一頁