From: "David A. Black" Date: 2009-07-01T22:16:12+09:00 Subject: Re: Making a random string Hi -- On Wed, 1 Jul 2009, Eleanor McHugh wrote: > On 1 Jul 2009, at 12:44, David A. Black wrote: >> I don't think the distinction is between success and failure, though. >> (str="ABC").upcase! succeeds -- it just doesn't change str. (I'm not a >> huge fan of the nil returns either, by the way.) >> >> Of course there's always: >> >> str = "ABC" >> str.tap(&:upcase!) >> >> :-) > > I'm still adjusting to these 1.9 conveniences ;) I'm still very skeptical about #tap. I can invent use cases for it but I don't think I've ever seen a situation where I'd actually use it. David -- David A. Black / Ruby Power and Light, LLC Ruby/Rails consulting & training: http://www.rubypal.com Now available: The Well-Grounded Rubyist (http://manning.com/black2) "Ruby 1.9: What You Need To Know" Envycasts with David A. Black http://www.envycasts.com