mirror of
https://github.com/discourse/discourse.git
synced 2025-02-11 13:55:07 +00:00
Ruby 2.7 or earlier `+contents` returns self.dup when `frozen_string_literal: true`. However, Ruby 3.0 returns self because this string is interpolated one, which is not frozen anymore. This commit uses self.dup to return duplicated string regardless Ruby versions. https://bugs.ruby-lang.org/issues/17104