Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #74 from kachick/improve/remove_warnings

Remove a warning "shadowing outer local variable - type"
  • Loading branch information...
commit 9abfc1c92731f3f0b31ad50914786d27423227ea 2 parents fe568aa + b39e38e
@delano delano authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/net/ssh/test/local_packet.rb
View
8 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
Please sign in to comment.
Something went wrong with that request. Please try again.