upgrades/protocol_up.rb in zold-0.31.5 vs upgrades/protocol_up.rb in zold-0.31.6
- old
+ new
@@ -1,8 +1,8 @@
# frozen_string_literal: true
-# Copyright (c) 2018-2023 Zerocracy, Inc.
+# Copyright (c) 2018-2023 Zerocracy
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the 'Software'), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@@ -33,13 +33,13 @@
def exec
Dir.new(@home).each do |path|
next unless path =~ /^[a-f0-9]{16}#{Wallet::EXT}$/
f = File.join(@home, path)
- lines = IO.read(f).split("\n")
+ lines = File.read(f).split("\n")
next if lines[1].to_i == Zold::PROTOCOL
lines[1] = Zold::PROTOCOL
- IO.write(f, lines.join("\n"))
+ File.write(f, lines.join("\n"))
@log.info("Protocol set to #{Zold::PROTOCOL} in #{f}")
end
end
end
end