lib/multipart/post/multipartable.rb in multipart-post-2.3.0 vs lib/multipart/post/multipartable.rb in multipart-post-2.4.0
- old
+ new
@@ -7,11 +7,11 @@
# Copyright, 2013, by Vincent Pellé.
# Copyright, 2013, by Gustav Ernberg.
# Copyright, 2013, by Socrates Vicente.
# Copyright, 2013, by Steffen Grunwald.
# Copyright, 2019, by Olle Jonsson.
-# Copyright, 2019-2022, by Samuel Williams.
+# Copyright, 2019-2024, by Samuel Williams.
# Copyright, 2019, by Patrick Davey.
# Copyright, 2022, by Jason York.
require_relative 'parts'
require_relative 'composite_read_io'
@@ -60,17 +60,11 @@
attr :boundary
private
- if RUBY_VERSION >= "2.5.0"
- def symbolize_keys(hash)
- hash.transform_keys(&:to_sym)
- end
- else
- def symbolize_keys(hash)
- hash.map{|key,value| [key.to_sym, value]}.to_h
- end
+ def symbolize_keys(hash)
+ hash.transform_keys(&:to_sym)
end
end
end
end