Project

General

Profile

« Previous | Next » 

Revision 5af5ea7f

Added by nagachika (Tomoyuki Chikanaga) over 4 years ago

merge revision(s) cfd162d535c7a4f8b1f95255cc6be696a8b75557: [Backport #17467]

 Make String#{strip,lstrip}{,!} strip leading NUL bytes The documentation already specifies that they strip whitespace and defines whitespace to include null. This wraps the new behavior in the appropriate guards in the specs, but does not specify behavior for previous versions, because this is a bug that could be backported. Fixes [Bug #17467] --- spec/ruby/core/string/lstrip_spec.rb | 18 ++++++++++++------ spec/ruby/core/string/strip_spec.rb | 22 ++++++++++------------ string.c | 4 ++-- test/ruby/test_string.rb | 16 ++++++++++++++++ 4 files changed, 40 insertions(+), 20 deletions(-)