diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-09-16 11:00:10 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-09-16 11:00:10 +0100 |
commit | 3c490942d0d98701d1c0971e60911fa6bd3ecb76 (patch) | |
tree | c7e992463fec552ae6483d7b81848aa185d3559f /dev-ruby/chunky_png/files | |
parent | c748acf4192a1e08c9feb2d5f0004937a4869639 (diff) |
gentoo auto-resync : 16:09:2023 - 11:00:10
Diffstat (limited to 'dev-ruby/chunky_png/files')
-rw-r--r-- | dev-ruby/chunky_png/files/chunky_png-1.4.0-ruby32.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/dev-ruby/chunky_png/files/chunky_png-1.4.0-ruby32.patch b/dev-ruby/chunky_png/files/chunky_png-1.4.0-ruby32.patch new file mode 100644 index 000000000000..75d08c9fc88d --- /dev/null +++ b/dev-ruby/chunky_png/files/chunky_png-1.4.0-ruby32.patch @@ -0,0 +1,29 @@ +From 8e6f5934541833f15664398f90331f3724e40933 Mon Sep 17 00:00:00 2001 +From: Mamoru TASAKA <mtasaka@fedoraproject.org> +Date: Tue, 15 Nov 2022 23:22:20 +0900 +Subject: [PATCH] ruby3_2 fix: check if object responds to regex_match op + +Object#=~ is already deprecated since ruby2.6 and will be +removed from ruby3.2. As the result, Array no longer +respond to =~ from ruby3.2, for example. + +Check if the target object really respond to =~ . + +Closes #168 +--- + lib/chunky_png/vector.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/chunky_png/vector.rb b/lib/chunky_png/vector.rb +index 4ef965f..034104c 100644 +--- a/lib/chunky_png/vector.rb ++++ b/lib/chunky_png/vector.rb +@@ -166,7 +166,7 @@ def dimension + # @return [Array<ChunkyPNG::Point>] The list of points interpreted from the input array. + def self.multiple_from_array(source) + return [] if source.empty? +- if source.first.is_a?(Numeric) || source.first =~ /^\d+$/ ++ if source.first.is_a?(Numeric) || ( source.first.respond_to?(:=~) && source.first =~ /^\d+$/ ) + raise ArgumentError, "The points array is expected to have an even number of items!" if source.length % 2 != 0 + + points = [] |