[#104004] [Ruby master Feature#17883] Load bundler/setup earlier to make `bundle exec ruby -r` respect Gemfile — mame@...
Issue #17883 has been reported by mame (Yusuke Endoh).
21 messages
2021/05/24
[ruby-core:103732] [Ruby master Bug#17467] What makes strip() and lstrip() not stripping \u0000 from beginning of the string?
From:
jean.boussier@...
Date:
2021-05-05 08:27:01 UTC
List:
ruby-core #103732
Issue #17467 has been updated by byroot (Jean Boussier). I believe this fix should be backported. ---------------------------------------- Bug #17467: What makes strip() and lstrip() not stripping \u0000 from beginning of the string? https://bugs.ruby-lang.org/issues/17467#change-91825 * Author: SouravGoswami (Sourav Goswami) * Status: Closed * Priority: Normal * ruby -v: ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux] * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- Both strip(), and rstrip() will delete \u0000 from the end of a string. But I have a string that has "\u0000hello\u0000". Output from strip, lstrip and rstrip: "\u0000hello\u0000".strip # => "\u0000hello" "\u0000hello\u0000".lstrip # => "\u0000hello\u0000" "\u0000hello\u0000".rstrip # => "\u0000hello" Same goes for \x00 as well. While it's quite ridiculous to have NULL at the beginning of the string, but what makes it not strip? Is that slow or is that because it's never used? -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>