* test/ruby/test_backtrace.rb: get rid of warnings. unused variable,

shadowing.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2014-03-02 15:18:36 +00:00
Родитель 5bf9ac3e92
Коммит 2c761d7264
2 изменённых файлов: 15 добавлений и 10 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Mon Mar 3 00:17:43 2014 NAKAMURA Usaku <usa@ruby-lang.org>
* test/ruby/test_backtrace.rb: get rid of warnings. unused variable,
shadowing.
Sun Mar 2 11:15:10 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> Sun Mar 2 11:15:10 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/find.rb (Find#find): add "ignore_error" keyword argument * lib/find.rb (Find#find): add "ignore_error" keyword argument

Просмотреть файл

@ -101,7 +101,7 @@ class TestBacktrace < Test::Unit::TestCase
} }
end end
} }
bt = Fiber.new{ Fiber.new{
rec[max] rec[max]
}.resume }.resume
end end
@ -111,21 +111,21 @@ class TestBacktrace < Test::Unit::TestCase
rec = lambda{|n| rec = lambda{|n|
if n < 0 if n < 0
(m*6).times{|lev| (m*6).times{|lev|
(m*6).times{|n| (m*6).times{|i|
t = caller(0).size t = caller(0).size
r = caller(lev, n) r = caller(lev, i)
r = r.size if r.respond_to? :size r = r.size if r.respond_to? :size
# STDERR.puts [t, lev, n, r].inspect # STDERR.puts [t, lev, i, r].inspect
if n == 0 if i == 0
assert_equal(0, r, [t, lev, n, r].inspect) assert_equal(0, r, [t, lev, i, r].inspect)
elsif t < lev elsif t < lev
assert_equal(nil, r, [t, lev, n, r].inspect) assert_equal(nil, r, [t, lev, i, r].inspect)
else else
if t - lev > n if t - lev > i
assert_equal(n, r, [t, lev, n, r].inspect) assert_equal(i, r, [t, lev, i, r].inspect)
else else
assert_equal(t - lev, r, [t, lev, n, r].inspect) assert_equal(t - lev, r, [t, lev, i, r].inspect)
end end
end end
} }