From: Eric Wong Date: 2014-11-16T12:08:51+00:00 Subject: [ruby-core:66318] Re: [ruby-trunk - Bug #10518] [Open] String "delete" method does not remove some characters from input string sergio.gallelli@gmail.com wrote: > irb(main):001:0> str = 'A-B' > => "A-B" > irb(main):002:0> str.delete ' -#' > => "A-B" ' -#' is interpreted as: range of characters from ' ' (space) to '#'. See String#count documentation I suppose it is weird and surprising behavior, but I doubt it can change for compatibility. I would normally use String#tr if I wanted a range.