From: martindemello@... (Martin DeMello) Date: 2003-06-22T21:47:53+09:00 Subject: String#decorate When chaining methods, it'd be neat to have something that was passed in the string and returned a 'decorated' version, e.g. pp = ary.join(",").decorate {|s| "[#{s}]"} attrib = title.capitalize.decorate {|t| "\t -- #{author[t]},\"#{t}\""} (n*100).to_s.decorate {|p| "#{p}% done"} as opposed to equivalents using String#+ and String#=, or even the fully functional but just a trifle ugly String.gsub /.*/ {|s| ...} Not quite an RCR (it's trivially implementable anyway) - just wanted to see what people thought of the idea, and in particular if anyone had nicer names to suggest. martin