gsub(/\A[\0\s]+|[\0\s]+\z/, "")よりsub(/\A[\0\s]+/, "").sub(/[\0\s]+\z/, "")の方がちょっと速いという知見を得た https://bugs.ruby-lang.org/issues/21552#note-8
gsub(/\A[\0\s]+|[\0\s]+\z/, "")よりsub(/\A[\0\s]+/, "").sub(/[\0\s]+\z/, "")の方がちょっと速いという知見を得た https://bugs.ruby-lang.org/issues/21552#note-8
If you have a fediverse account, you can quote this note from your own instance. Search https://social.shugo.net/ap/users/115529376841896980/statuses/115694133820928344 on your instance and quote it. (Note that quoting is not supported in Mastodon.)