1
0
зеркало из https://github.com/glebtv/telegram-bot.git synced 2026-09-03 09:46:17 +03:00

Fix frozen string issue for ruby < 3 (#235)

Этот коммит содержится в:
Max Melentiev
2024-05-12 21:42:33 +01:00
коммит произвёл GitHub
родитель ad1eb5a47f
Коммит ffd17ec933
3 изменённых файлов: 12 добавлений и 9 удалений

Просмотреть файл

@@ -117,15 +117,15 @@ module Telegram
:arg_list_matcher, :matching_requests_count
def base_message
"make #{expectation_type.to_s.tr('_', ' ')} #{expected_number} " \
"#{bot.inspect}.#{action} requests,".tap do |msg|
msg << " with #{arg_list_matcher}," if arg_list_matcher
msg << " but made #{matching_requests_count}"
if performed_requests
actual_args = performed_requests.map(&:inspect).join(', ')
msg << ", and #{performed_requests.count} with #{actual_args}"
end
msg = "make #{expectation_type.to_s.tr('_', ' ')} #{expected_number} " \
"#{bot.inspect}.#{action} requests,"
msg += " with #{arg_list_matcher}," if arg_list_matcher
msg += " but made #{matching_requests_count}"
if performed_requests
actual_args = performed_requests.map(&:inspect).join(', ')
msg += ", and #{performed_requests.count} with #{actual_args}"
end
msg
end
end

Просмотреть файл

@@ -19,7 +19,7 @@ module Telegram
payload = event.payload
additions = UpdatesController.log_process_action(payload)
message = "Completed in #{event.duration.round}ms"
message << " (#{additions.join(' | ')})" if additions.present?
message += " (#{additions.join(' | ')})" if additions.present?
message
end
end