Skip to content

Commit

Permalink
Fix warnings for Ruby 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
drbrain committed Feb 12, 2014
1 parent b23da2d commit f2f229e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/systemu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ def quote *args, &block
SystemUniversal.quote(*args, &block)
end

def new_thread cid, block
def new_thread child_pid, block
q = Queue.new
Thread.new(cid) do |cid|
Thread.new(child_pid) do |cid|
current = Thread.current
current.abort_on_exception = true
q.push current
Expand Down Expand Up @@ -205,9 +205,9 @@ def child_program config
end

def relay srcdst
src, dst, ignored = srcdst.to_a.first
src, dst, _ = srcdst.to_a.first
if src.respond_to? 'read'
while((buf = src.read(8192))); dst << buf; end
while((buffer = src.read(8192))); dst << buffer; end
else
if src.respond_to?(:each_line)
src.each_line{|buf| dst << buf}
Expand Down Expand Up @@ -256,11 +256,11 @@ def tmpdir d = Dir.tmpdir, max = 42, &b

def getopts opts = {}
lambda do |*args|
keys, default, ignored = args
keys, default, _ = args
catch(:opt) do
[keys].flatten.each do |key|
[key, key.to_s, key.to_s.intern].each do |key|
throw :opt, opts[key] if opts.has_key?(key)
[key, key.to_s, key.to_s.intern].each do |k|
throw :opt, opts[k] if opts.has_key?(k)
end
end
default
Expand Down

0 comments on commit f2f229e

Please sign in to comment.