Workaround for https://bugs.ruby-lang.org/issues/8182