Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はRubyを学び始めたばかりで、これを理解することはできません。配列があるとしましょう:
s = ["p", "e", "n", "c", "i", "l"]
文字が次のような単語を形成するように配列を変更するにはどうすればよいですか?
t = ["pencil"]
1.9.3-p194 :003 > s = ["p", "e", "n", "c", "i", "l"] => ["p", "e", "n", "c", "i", "l"] 1.9.3-p194 :004 > t = [s.join] => ["pencil"]