workaround for https://bugs.ruby-lang.org/issues/6127