It gets sticky depending where you are, but the sort of copyright law that works for commissioning marketing materials is a lot different than the sort of arrangement software developers should be looking for. You can otherwise get in a position where you're not able to reuse your own code across multiple projects.
What are the chances you're writing a piece of software that is so useful and cross project that you're not releasing as open source or a Gem? I don't think 37Signals would be doing any better today if they had kept Rails to themselves. You can worry about this mythical case but it's incredibly unlikely to happen and will more likely hurt your ability to do work.