I agree with this outlook. However, I don't know how I'd react if this were to happen to me. If I do something out of altruism and somebody takes it and makes money off it, I guess it leaves a bad taste? Other than that, I think this approach is done everyday by every developer, whether they take code from other softwares or from StackOverflow, very rarely do they credit or even give reference to where the code has been taken from.
My only fear would be them turning it around and preventing me or others from using the idea in the future with their big squad of lawyers. They wouldn't even need a legitimize claim to pull it off.