1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/digest/test_digest.rb (test_eq): show failed class.

* test/ruby/test_iterator.rb (test_break, test_return_trace_func):
  test localjump destination.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2003-10-15 23:38:10 +00:00
parent c1b6f966be
commit e45c4cd1ac
3 changed files with 31 additions and 3 deletions

View file

@ -403,4 +403,25 @@ class TestIterator < Test::Unit::TestCase
end
assert(false, "must not reach here")
end
def test_break_from_enum
result = ["a"].inject("ng") {|x,y| break "ok"}
assert_equal("ok", result)
end
def _test_return_trace_func(x)
set_trace_func(proc {})
[].fetch(2) {return x}
ensure
set_trace_func(nil)
end
def test_return_trace_func
ok = "returned gracefully"
result = "skipped"
result = _test_return_from_builtin(ok)
ensure
assert_equal(ok, result)
return
end
end