Alternative join and split in Ruby
Posted on 09 July 2008
Join
>> %w(tic tac toe) * "-"
=> "tic-tac-toe"
Split
>> "tic-tac-toe" / "-"
=> ["tic", "tac", "toe"]
Unfortunately, for split you’ll need this of course:
class String
alias / :split
end
;)

