use regexp-safe string operations in String#chomp
Merge pull request #272 from mojavelinux/chomp-fix

use regexp-safe string operations in String#chomp