From: matz@... Date: 2017-07-14T06:07:49+00:00 Subject: [ruby-core:82045] [Ruby trunk Feature#13665] String#delete_suffix Issue #13665 has been updated by matz (Yukihiro Matsumoto). Looks good to me. Matz. ---------------------------------------- Feature #13665: String#delete_suffix https://bugs.ruby-lang.org/issues/13665#change-65772 * Author: sonots (Naotoshi Seo) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- In https://bugs.ruby-lang.org/issues/12694, we decided to have `String#delete_prefix`. It would be nice to have `String#delete_suffix` method to delete suffix from a string for symmetry although it can be achieved with `String#chomp` as: ```ruby class String def delete_suffix(substr) chomp(substr) end def delete_suffix!(substr) chomp!(substr) end end ``` Any opinions? -- https://bugs.ruby-lang.org/ Unsubscribe: