[ruby-cvs:66555] sonots:r59377 (trunk): string.c: add String#delete_suffix and String#delete_suffix!

sonots at ruby-lang.org sonots at ruby-lang.org
Fri Jul 21 01:29:19 JST 2017


sonots	2017-07-21 01:29:19 +0900 (Fri, 21 Jul 2017)

  New Revision: 59377

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59377

  Log:
    string.c: add String#delete_suffix and String#delete_suffix!
    to remove trailing suffix [Feature #13665] [Fix GH-1661]
    
    * string.c (rb_str_delete_suffix_bang): add a new method
      to remove suffix destuctively.
    
    * string.c (rb_str_delete_suffix): add a new method
      to remove suffix non-destuctively.
    
    * test/ruby/test_string.rb: add tests.

  Modified files:
    trunk/string.c
    trunk/test/ruby/test_string.rb


More information about the ruby-cvs mailing list