fix rubocop Style/MethodCallParentheses cop

This commit is contained in:
Pavel Lobashov 2015-03-23 19:06:43 +03:00
parent 47b72f5cab
commit 930b5ae45b
6 changed files with 7 additions and 12 deletions

View File

@ -160,11 +160,6 @@ Style/IfUnlessModifier:
Style/InfiniteLoop:
Enabled: false
# Offense count: 7
# Cop supports --auto-correct.
Style/MethodCallParentheses:
Enabled: false
# Offense count: 58
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/MethodName:

View File

@ -25,7 +25,7 @@ class ZipFileGenerator
io = Zip::File.open(@outputFile, Zip::File::CREATE)
writeEntries(entries, '', io)
io.close()
io.close
end
# A helper method to make the recursion work.
@ -44,7 +44,7 @@ class ZipFileGenerator
subdir.delete('..')
writeEntries(subdir, zipFilePath, io)
else
io.get_output_stream(zipFilePath) { |f| f.puts(File.open(diskFilePath, 'rb').read()) }
io.get_output_stream(zipFilePath) { |f| f.puts(File.open(diskFilePath, 'rb').read) }
end
end
end

View File

@ -77,7 +77,7 @@ class MainApp < Gtk::Window
end
end
mainApp = MainApp.new()
mainApp = MainApp.new
mainApp.show_all

View File

@ -88,5 +88,5 @@ zd = ZipDialog.new
zd.load(ARGV[0])
a.mainWidget = zd
zd.show()
a.exec()
zd.show
a.exec

View File

@ -25,7 +25,7 @@ class ZipFileExtractTest < MiniTest::Test
assert(File.exist?(EXTRACTED_FILENAME))
AssertEntry.assert_contents(EXTRACTED_FILENAME,
entry.get_input_stream() { |is| is.read })
entry.get_input_stream { |is| is.read })
end
end

View File

@ -51,7 +51,7 @@ class ZipFileSplitTest < MiniTest::Test
assert(File.exist?(EXTRACTED_FILENAME))
AssertEntry.assert_contents(EXTRACTED_FILENAME,
entry.get_input_stream() { |is| is.read })
entry.get_input_stream { |is| is.read })
end
end
end