Issue #10574 has been updated by Robert A. Heiler.


Possibly also add the default without arguments in order to compare to .chomp:

  "\nacbdef\n".chomp  # => "\nacbdef"
  "\nacbdef\n".lchomp # => "acbdef\n"



----------------------------------------
Feature #10574: Add String#lchomp and String.lchomp!
https://bugs.ruby-lang.org/issues/10574#change-50404

* Author: Alex Boyd
* Status: Open
* Priority: Normal
* Assignee: Yukihiro Matsumoto
* Category: core
* Target version: 
----------------------------------------
With the expected behavior, i.e.

~~~
irb(main):013:0> 'foobar'.lchomp('foo')
=> "bar"
irb(main):014:0> 'foobar'.lchomp('baz')
=> "foobar"
~~~

A quick google search will turn up plenty of practical uses for this, as well as lots of libraries that patch `String` themselves to add this.



-- 
https://bugs.ruby-lang.org/