Merge tag 'v4.2.0-beta2'

This commit is contained in:
bgme 2023-08-22 03:51:20 +08:00
commit 9e38d55101
3010 changed files with 81215 additions and 55173 deletions

View file

@ -45,7 +45,7 @@ class StatusLengthValidator < ActiveModel::Validator
def rewrite_entities(str, entities)
entities.sort_by! { |entity| entity[:indices].first }
result = ''.dup
result = +''
last_index = entities.reduce(0) do |index, entity|
result << str[index...entity[:indices].first]
@ -53,7 +53,7 @@ class StatusLengthValidator < ActiveModel::Validator
entity[:indices].last
end
result << str[last_index..-1]
result << str[last_index..]
result
end
end