Skip to content

Commit

Permalink
- Removed unused variable warnings for Ruby 1.9.3
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//src/ZenTest/dev/": change = 6478]
  • Loading branch information
drbrain committed Jul 22, 2011
1 parent a855810 commit 2c56f3b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
5 changes: 0 additions & 5 deletions lib/unit_diff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ def parse_diff(result)
expect = []
butwas = []
footer = []
found = false
state = :header

until result.empty? do
Expand Down Expand Up @@ -203,9 +202,6 @@ def unit_diff(input=ARGF, output=$stdout)

# Output
data.each do |result|
first = []
second = []

if result.first =~ /Error/ then
output.push result.join('')
next
Expand Down Expand Up @@ -269,7 +265,6 @@ def diff expect, butwas
end

def massage(data)
count = 0
# unescape newlines, strip <> from entire string
data = data.join
data = data.gsub(/\\n/, "\n").gsub(/0x[a-f0-9]+/m, '0xXXXXXX') + "\n"
Expand Down
4 changes: 2 additions & 2 deletions lib/zentest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def methods_and_tests(klassname, testklassname)
def analyze_impl(klassname)
testklassname = self.convert_class_name(klassname)
if @test_klasses[testklassname] then
methods, testmethods = methods_and_tests(klassname,testklassname)
_, testmethods = methods_and_tests(klassname, testklassname)

# check that each method has a test method
@klasses[klassname].each_key do | methodname |
Expand All @@ -353,7 +353,7 @@ def analyze_impl(klassname)
unless testmethods.keys.find { |m| m =~ /#{testmethodname}(_\w+)+$/ } then
self.add_missing_method(testklassname, testmethodname)
end
rescue RegexpError => e
rescue RegexpError
puts "# ERROR trying to use '#{testmethodname}' as a regex. Look at #{klassname}.#{methodname}"
end
end # testmethods[testmethodname]
Expand Down
2 changes: 0 additions & 2 deletions test/test_unit_diff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ def test_input_mspec_multiline
end

def test_unit_diff_empty # simulates broken pipe at the least
input = ""
expected = ""
util_unit_diff("", "", "")
end

Expand Down

0 comments on commit 2c56f3b

Please sign in to comment.