1require '-test-/bug-5832/bug'
2
3class Test_BUG_5832 < Test::Unit::TestCase
4  def test_block_passing
5    bug5832 = '[ruby-dev:45071]'
6
7    c = Class.new do
8      define_method(:call_invoke_block_from_c) do
9        Bug.funcall_callback(self)
10      end
11
12      def callback
13        yield if block_given?
14      end
15    end
16
17    assert_nothing_raised(RuntimeError, bug5832) do
18      c.new.call_invoke_block_from_c { raise 'unreachable' }
19    end
20  end
21end
22