From 9d73a4d0971ed60254bb5fbe35ce385c8b92205d Mon Sep 17 00:00:00 2001 From: Debasish Biswas Date: Sat, 28 Oct 2023 16:58:47 +0000 Subject: [PATCH] set to use utf-8 encoding Signed-off-by: Debasish Biswas --- net-imap.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net-imap.gemspec b/net-imap.gemspec index a98be7c5..629b4695 100644 --- a/net-imap.gemspec +++ b/net-imap.gemspec @@ -2,7 +2,7 @@ name = File.basename(__FILE__, ".gemspec") version = ["lib", Array.new(name.count("-"), "..").join("/")].find do |dir| - break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line| + break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb"), :encoding=> 'utf-8') do |line| /^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1 end rescue nil end