Merge pull request #87 from weilu/remove_unused_variables
Remove assigned but unused variables
This commit is contained in:
@@ -23,7 +23,7 @@ class AboutBlocks < EdgeCase::Koan
|
||||
end
|
||||
|
||||
def test_blocks_can_take_arguments
|
||||
result = method_with_block_arguments do |argument|
|
||||
method_with_block_arguments do |argument|
|
||||
assert_equal __("Jim"), argument
|
||||
end
|
||||
end
|
||||
|
||||
@@ -48,7 +48,7 @@ class AboutExceptions < EdgeCase::Koan
|
||||
result = nil
|
||||
begin
|
||||
fail "Oops"
|
||||
rescue StandardError => ex
|
||||
rescue StandardError
|
||||
# no code here
|
||||
ensure
|
||||
result = :always_run
|
||||
|
||||
@@ -5,7 +5,7 @@ class AboutSandwichCode < EdgeCase::Koan
|
||||
def count_lines(file_name)
|
||||
file = open(file_name)
|
||||
count = 0
|
||||
while line = file.gets
|
||||
while file.gets
|
||||
count += 1
|
||||
end
|
||||
count
|
||||
@@ -66,7 +66,7 @@ class AboutSandwichCode < EdgeCase::Koan
|
||||
def count_lines2(file_name)
|
||||
file_sandwich(file_name) do |file|
|
||||
count = 0
|
||||
while line = file.gets
|
||||
while file.gets
|
||||
count += 1
|
||||
end
|
||||
count
|
||||
@@ -99,7 +99,7 @@ class AboutSandwichCode < EdgeCase::Koan
|
||||
def count_lines3(file_name)
|
||||
open(file_name) do |file|
|
||||
count = 0
|
||||
while line = file.gets
|
||||
while file.gets
|
||||
count += 1
|
||||
end
|
||||
count
|
||||
|
||||
@@ -19,7 +19,7 @@ class AboutScope < EdgeCase::Koan
|
||||
|
||||
def test_dog_is_not_available_in_the_current_scope
|
||||
assert_raise(___(NameError)) do
|
||||
fido = Dog.new
|
||||
Dog.new
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user