From: "Jan E." Date: 2012-09-25T22:14:43+09:00 Subject: Re: inject problem Roelof Wobben wrote in post #1077457: > I have one question about the solution of Prasadhnc C Haven't you read the other postings? :-( "inject" is completely useless in your case, since you don't do what it's meant for: building a value by subsequently calling the block. You just pass the same object again and again. Yes, "inject" still works. But you basically circumvent the actual mechanism -- in which case "each_with_object" would be a better fit. Or do you want to use "inject" no matter what? -- Posted via http://www.ruby-forum.com/.