From 31bc8633d483b0f61013bf78307b89ba08fc03cc Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 3 Nov 2015 20:40:13 +0100 Subject: [PATCH] SimpleTest class: avoid a couple of warnings --- tests/test.d/simple_test.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/test.d/simple_test.rb b/tests/test.d/simple_test.rb index 805fd517d..6b3b75587 100644 --- a/tests/test.d/simple_test.rb +++ b/tests/test.d/simple_test.rb @@ -126,7 +126,7 @@ class SimpleTest sys "../src/mkvmerge #{full_command_line} > #{tmp}", :exit_code => options[:exit_code] if options[:filter] text = options[:filter].call(IO.readlines(tmp).join('')) - File.open(tmp, 'w') { |file| file.puts text } + File.open(tmp, 'w') { |tmp_file| tmp_file.puts text } end options[:keep_tmp] ? hash_file(tmp) : hash_tmp }, @@ -163,7 +163,6 @@ class SimpleTest def test_ui_locale locale, *args describe "mkvmerge / UI locale: #{locale}" - options = args.extract_options! @blocks[:tests] << { :name => "mkvmerge UI locale #{locale}", :block => lambda { @@ -189,7 +188,7 @@ class SimpleTest end def run_test - @blocks[:setup].each &:call + @blocks[:setup].each(&:call) results = @blocks[:tests].collect do |test| result = nil @@ -201,7 +200,7 @@ class SimpleTest result end - @blocks[:cleanup].each &:call + @blocks[:cleanup].each(&:call) unlink_tmp_files