We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
&.
1 parent 306e1e8 commit b4d9354Copy full SHA for b4d9354
lib/cgi/session.rb
@@ -406,8 +406,8 @@ def restore
406
@hash[CGI::unescape(k)] = Marshal.restore(CGI::unescape(v))
407
end
408
ensure
409
- f.close unless f.nil?
410
- lockf.close if lockf
+ f&.close
+ lockf&.close
411
412
413
@hash
@@ -426,8 +426,8 @@ def update
426
f.close
427
File.rename @path+".new", @path
428
429
- f.close if f
430
431
432
433
0 commit comments