From: Florian Gross Date: 2007-07-02T06:13:53+09:00 Subject: Array#delete is destructive, String#delete isn't Hi, Array has #- for non-destructively removing elements and #delete for destructively removing them; Hash only has #delete for destructively removing elements. String has #delete for non-destructively removing elements and #delete! for destructively removing them: a = [1, 2, 3] a - [2] # => [1, 3] a # => [1, 2, 3] a.delete(2) a # => [1, 3] s = "hello world" s.delete("h") # => "ello world" s # => "hello world" s.delete!("h") s # => "ello world" The different meaning of delete() for String is just confusing. Fortunately, it isn't used much. I think it should be made consistent with Array and Hash. I understand that this can't be changed in 1.8. What about 1.9? Kind regards, Florian Gross