lib/spoom/sorbet/sigils.rb in spoom-1.1.10 vs lib/spoom/sorbet/sigils.rb in spoom-1.1.11
- old
+ new
@@ -64,10 +64,10 @@
sig { params(path: T.any(String, Pathname), new_strictness: String).returns(T::Boolean) }
def self.change_sigil_in_file(path, new_strictness)
content = File.read(path, encoding: Encoding::ASCII_8BIT)
new_content = update_sigil(content, new_strictness)
- File.write(path, new_content)
+ File.write(path, new_content, encoding: Encoding::ASCII_8BIT)
strictness_in_content(new_content) == new_strictness
end
# changes the sigil to have a new strictness in a list of files