Commit f35e0d36
f35e0d36da11Merged
Yukihiro "Matz" Matsumoto <[email protected]> · 5 months ago · 2 files · +2 added
Description
Add regression test for strip/lstrip/rstrip removing NUL
String#strip, #lstrip, and #rstrip already remove the NUL byte along with ASCII whitespace in the current tree; lock it in with a test.
Closes #1092
Co-Authored-By: Claude Opus 4.8 [email protected]
Details
- Commit
- f35e0d36da11
- Parent
- 5c3b0ec641a4
test/string_strip_nul.rbaddedView file
1+
# String#strip / #lstrip / #rstrip remove the NUL byte along with ASCII2+
# whitespace, matching CRuby.3+
p "\0 abc \0".strip4+
p "abc\0\0".rstrip5+
p "\0\0abc".lstrip6+
p " \t\nx\r\f ".strip7+
p "\0".strip8+
p "no change".striptest/string_strip_nul.rb.expectedaddedView file
Loading diff…