String#chomp([param]) returns a new string that's the same as the receiver* but with the line endings (or optional parameter) removed from the end.
String#chomp!([param]) modifies the receiver; in other words, it's destructive -- it mutates the original string rather than producing a new one.
Scheme also follows this tradition of putting exclamation marks after destructive functions.
* receiver being the object on which the "method" is called (in Ruby-speak, inheriting from Smalltalk-speak, methods are "messages" and the objects on which they are called are "receivers").
|