mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/tsort.rb (test_orphaned_break): removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8855456929
commit
8b279c0ddb
2 changed files with 4 additions and 14 deletions
|
@ -1,3 +1,7 @@
|
|||
Wed Dec 24 23:29:30 2003 Tanaka Akira <akr@m17n.org>
|
||||
|
||||
* lib/tsort.rb (test_orphaned_break): removed.
|
||||
|
||||
Wed Dec 24 20:53:06 2003 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
* ext/tk/sample/tkmulticolumnlist.rb: new sample
|
||||
|
|
14
lib/tsort.rb
14
lib/tsort.rb
|
@ -283,20 +283,6 @@ if __FILE__ == $0
|
|||
assert_equal([[0], [1]],
|
||||
a.strongly_connected_components.map {|nodes| nodes.sort})
|
||||
end
|
||||
|
||||
def orphaned_proc(block_str)
|
||||
eval "lambda {#{block_str}}"
|
||||
end
|
||||
|
||||
def test_orphaned_break
|
||||
a = [[1], [2], []]
|
||||
@n = 0
|
||||
x = orphaned_proc %{|c| @n += 1; break :break_value}
|
||||
assert_nothing_raised {
|
||||
assert_equal(:break_value, a.each_strongly_connected_component(&x))
|
||||
}
|
||||
assert_equal(1, @n)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue