Also in practice you'd probably want to use `sub!` to mutate in place if a big String. That would avoid a copy, since CRuby doesn't do lazy substrings which don't share the same end.Eregon (Benoit Daloze)
Eregon (Benoit Daloze) wrote in #note-9: > but that sounds more like something that could/should be optimized in the regexp engine To substantiate that: ``` $ ruby -rbenchmark/ips -e 'SPACES = ["\0", *("\t".."\r"), " "].join; TARGE...Eregon (Benoit Daloze)
This sounds like a lot of complexity for one specific use-case, which already has a good solution with `sub`. From the benchmarks, `lstrip("\0 \t-\r")` and `sub(/\A[\0\s]+/, "")` are pretty close. `sub(/[\0\s]+\z/, "")` is slower tha...Eregon (Benoit Daloze)
:+1: I don't think it has any usefulness anymore. I do know of one usage of `RUBY_PATCHLEVEL`, for detecting if on a dev build or release version via `is_release = RUBY_PATCHLEVEL >= 0`. Notably used in https://github.com/grpc/grpc/b...Eregon (Benoit Daloze)
* See discussion in https://github.com/ruby/net-http/pull/224 * This check is known to work on at least CRuby, TruffleRuby and JRuby. * Exceptions show up with `ruby -d`/`$DEBUG == true` and would show for every Net::HTTP instance. http...Eregon (Benoit Daloze)
* It looked like: In a future version of Bundler, running `bundle` without argument will no longer run `bundle install`. Instead, the `cli_help` command will be displayed. Please use `bundle install` explicitly fo...Eregon (Benoit Daloze)
* `install_or_cli_help` does not exist for older Bundler like Bundler 2 and so results in a confusing error on Bundler 2: ``` $ bundle Could not find command "". ``` * See https://github.com/ruby/rubygems/pull/9136/files#r25923...Eregon (Benoit Daloze)