Rescue Type error in reformat_value

Ruby2.2 and 2.3 cannot dup Fixnum and some classes.

Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
Kenji Okimoto 2018-07-19 14:33:15 +09:00
parent 39061fe38e
commit aeefc82ca4
No known key found for this signature in database
GPG Key ID: F9E3E329A5C5E4A1

View File

@ -162,7 +162,11 @@ class Fluentd
else
type
end
Fluent::Config::REFORMAT_VALUE.call(type_name, value.dup)
begin
Fluent::Config::REFORMAT_VALUE.call(type_name, value.dup)
rescue TypeError
Fluent::Config::REFORMAT_VALUE.call(type_name, value)
end
end
end
end