lib/carrierwave/processing/rmagick.rb in carrierwave-2.1.0 vs lib/carrierwave/processing/rmagick.rb in carrierwave-2.1.1

- old
+ new

@@ -376,12 +376,18 @@ private def create_info_block(options) return nil unless options - assignments = options.map { |k, v| "self.#{k} = #{v}" } - code = "lambda { |img| " + assignments.join(";") + "}" - eval code + proc do |img| + options.each do |k, v| + if v.is_a?(String) && (matches = v.match(/^["'](.+)["']/)) + ActiveSupport::Deprecation.warn "Passing quoted strings like #{v} to #manipulate! is deprecated, pass them without quoting." + v = matches[1] + end + img.public_send(:"#{k}=", v) + end + end end def destroy_image(image) image.try(:destroy!) end