lib/rvg/transformable.rb in rmagick-4.1.0.rc2 vs lib/rvg/transformable.rb in rmagick-4.1.0
- old
+ new
@@ -4,11 +4,12 @@
#++
module Magick
class RVG
# Transforms is an Array with a deep_copy method.
# During unit-testing it also has a deep_equal method.
- class Transforms < Array #:nodoc:
+ # @private
+ class Transforms < Array
def deep_copy(_h = nil)
copy = self.class.new
each { |transform| copy << [transform[0], transform[1].dup] }
copy
end
@@ -92,10 +93,10 @@
@transforms << [:translate, [-cx, -cy]]
else
raise ArgumentError, "wrong number of arguments (#{args.length} for 1 or 3)"
end
rescue ArgumentError
- raise ArgumentError, "arguments must be convertable to float (got #{[angle, *args].collect(&:class).join(', ')})"
+ raise ArgumentError, "arguments must be convertable to float (got #{[angle, *args].map(&:class).join(', ')})"
end
yield(self) if block_given?
self
end