From dcaab8249ec06afce4110fc4ec63dd919d510056 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 28 Oct 2019 20:28:57 +0000 Subject: fix more indentation warnings Not sure how or why I missed these with commit 4e0f8155a62711ae ("fix indentation warnings with ruby trunk"), but this cleans them up. --- lib/mogilefs/new_file/stream.rb | 4 ++-- test/test_fresh.rb | 4 ++-- test/test_http_reader.rb | 4 ++-- test/test_mogilefs.rb | 16 ++++++++-------- test/test_mogilefs_integration.rb | 4 ++-- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/mogilefs/new_file/stream.rb b/lib/mogilefs/new_file/stream.rb index 2207a13..4396b8b 100644 --- a/lib/mogilefs/new_file/stream.rb +++ b/lib/mogilefs/new_file/stream.rb @@ -58,8 +58,8 @@ class MogileFS::NewFile::Stream end read_response(@to_io) # raises on errors create_close(@devid, @uri, @bytes_uploaded) - ensure - @to_io.close if @to_io && ! @to_io.closed? + ensure + @to_io.close if @to_io && ! @to_io.closed? end def start_sock(sock, uri) diff --git a/test/test_fresh.rb b/test/test_fresh.rb index ff7bae6..b8ae292 100644 --- a/test/test_fresh.rb +++ b/test/test_fresh.rb @@ -247,8 +247,8 @@ class TestMogFresh < Test::Unit::TestCase assert_equal 1, tmp["mindevcount"] assert_equal "MultipleHosts(1)", tmp["replpolicy"] @admin.update_class(domain, "klassy", 2) - ensure - @admin.delete_class(domain, "klassy") rescue nil + ensure + @admin.delete_class(domain, "klassy") rescue nil end def test_device_file_add diff --git a/test/test_http_reader.rb b/test/test_http_reader.rb index f6f0055..e2d8842 100644 --- a/test/test_http_reader.rb +++ b/test/test_http_reader.rb @@ -16,8 +16,8 @@ class TestHTTPReader < Test::Unit::TestCase assert_nil th.value assert_kind_of IO, r r - ensure - s.close + ensure + s.close end def test_short_to_s diff --git a/test/test_mogilefs.rb b/test/test_mogilefs.rb index 186e88a..45d4452 100644 --- a/test/test_mogilefs.rb +++ b/test/test_mogilefs.rb @@ -590,8 +590,8 @@ class TestMogileFS__MogileFS < TestMogileFS assert_equal "foo", tmp.delete("domain") assert_equal expect, tmp c.backend.shutdown - ensure - sock.close + ensure + sock.close end def test_get_paths_args @@ -762,8 +762,8 @@ class TestMogileFS__MogileFS < TestMogileFS th.join received.map! { |(key,_,_)| key } assert_equal %w(a b c d e), received - ensure - sock.close + ensure + sock.close end def test_list_keys_verbose_retry_eof # implementation detail @@ -806,8 +806,8 @@ class TestMogileFS__MogileFS < TestMogileFS th.join received.map! { |(key,_,_)| key } assert_equal %w(a b c d e), received - ensure - sock.close + ensure + sock.close end def test_list_keys_verbose_retry_truncated # implementation detail @@ -851,8 +851,8 @@ class TestMogileFS__MogileFS < TestMogileFS th.join received.map! { |(key,_,_)| key } assert_equal %w(a b c d e), received - ensure - sock.close + ensure + sock.close end def test_sleep diff --git a/test/test_mogilefs_integration.rb b/test/test_mogilefs_integration.rb index 6d16cd7..13ae3f1 100644 --- a/test/test_mogilefs_integration.rb +++ b/test/test_mogilefs_integration.rb @@ -242,8 +242,8 @@ class TestMogileFSIntegration < Test::Unit::TestCase assert_raises(MogileFS::Backend::UnregClassError) { @client.new_file("a", :class => "non-existent") } - ensure - r.close if r + ensure + r.close if r end def test_store_content_opts -- cgit v1.2.3-24-ge0c7