Glenn Parker wrote:

> Aquila wrote:
> 
>> Possibly a stupid question: why does strip! of a string with a single
>> character in it give nil and strip the single character? I don't 
>> understand the behaviour of strip!...
> 
> 
> Looks like a bug to me.
> 
> $ ruby -e 'p " x ".strip!'
> "x"
> 
> $ ruby -e 'p "x".strip!'
> nil

This is by design. The destructive forms of built-in methods usually 
return nil when they do nothing.