From d6de464570d0060d6d1201da2e70b889c6afeb24 Mon Sep 17 00:00:00 2001 From: Jim Gay Date: Fri, 20 Dec 2024 17:09:15 -0500 Subject: [PATCH] Drop support for Rubies below 2.3 --- lib/radius/utility.rb | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/lib/radius/utility.rb b/lib/radius/utility.rb index 425ec6d..aab4874 100644 --- a/lib/radius/utility.rb +++ b/lib/radius/utility.rb @@ -27,20 +27,11 @@ def self.camelize(underscored_string) string end - if RUBY_VERSION[0,3] >= '2.3' - def self.array_to_s(c) - c.map do |x| - res = (x.is_a?(Array) ? array_to_s(x) : x.to_s) - +res - end.join - end - else - def self.array_to_s(c) - c.map do |x| - res = (x.is_a?(Array) ? array_to_s(x) : x.to_s) - (res.frozen? ? res.dup : res).force_encoding(Encoding::UTF_8) - end.join - end + def self.array_to_s(c) + c.map do |x| + res = (x.is_a?(Array) ? array_to_s(x) : x.to_s) + +res + end.join end end end \ No newline at end of file