Permalink
Browse files

Merge pull request #74 from kachick/improve/remove_warnings

Remove a warning "shadowing outer local variable - type"
  • Loading branch information...
2 parents fe568aa + b39e38e commit 9abfc1c92731f3f0b31ad50914786d27423227ea @delano delano committed Jan 11, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/net/ssh/test/local_packet.rb
@@ -33,17 +33,17 @@ def process(packet)
type = packet.read_byte
raise "expected #{@type}, but got #{type}" if @type != type
- @data.zip(types).each do |expected, type|
- type ||= case expected
+ @data.zip(types).each do |expected, _type|
+ _type ||= case expected
when nil then break
when Numeric then :long
when String then :string
when TrueClass, FalseClass then :bool
end
- actual = packet.send("read_#{type}")
+ actual = packet.send("read_#{_type}")
next if expected.nil?
- raise "expected #{type} #{expected.inspect} but got #{actual.inspect}" unless expected == actual
+ raise "expected #{_type} #{expected.inspect} but got #{actual.inspect}" unless expected == actual
end
end
end

0 comments on commit 9abfc1c

Please sign in to comment.