From: jason solomon Date: 2011-05-26T04:22:46+09:00 Subject: Method that mutates object Say we want to write a String method called clear that takes a given string and modifies that string to be equal to "". Ex. str = "string" we call str.clear and we get back "", not just "" printed to the screen, but the value of str is now "" (mutate the original string). I understand that the following code would just print "" to the screen but not modify the actual str object. class String def clear "" end end How would you write a method that actually modifies the str object? -- Posted via http://www.ruby-forum.com/.