Alternative join and split in Ruby
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
;)

RSS
Contact
Just my opinion here, but I don’t like either of those conventions. To me they are not clear. If someone else was picking up my code, they might find those a bit confusing. The split nomenclature is farily common among several languages.
But I will give you that they are concise.