I am new to Ruby and have worked my way through Mr. Neighborly Humble Little Ruby Guide. There were several typos in the code examples along the way, but I always managed to figure out what was wrong, and then fix it - so far!
It is really simple, but I can not get the following example for working with Mac OS X (Snow Leopard):
gone = "Got gone fool!"
puts "Original: " + gone
gone.delete!("o", "r-v")
puts "deleted: " + gone
The output I expect is:
Original: Got gone fool!
deleted: G gne fl!
The output I really get is:
Original: Got gone fool!
deleted: Got gone fool!
Delete! the method did not seem to have any effect.
Can anyone shed light on what is happening here ?: - \
source
share