Remove assigned but unused variables

This commit is contained in:
Wei Lu
2013-02-28 18:59:58 +08:00
parent 1a073e5db5
commit aa3c83f044
4 changed files with 6 additions and 6 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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