lib/benchmark_driver/struct.rb in benchmark_driver-0.10.5 vs lib/benchmark_driver/struct.rb in benchmark_driver-0.10.6

- old
+ new

@@ -54,10 +54,14 @@ klass.prepend(Module.new { def initialize(**) super self.class.defaults.each do |key, value| if public_send(key).nil? - public_send("#{key}=", value.dup) + begin + value = value.dup + rescue TypeError # for Ruby <= 2.3, like `true.dup` + end + public_send("#{key}=", value) end end end })