diff options
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_knownbug.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/bootstraptest/test_knownbug.rb b/bootstraptest/test_knownbug.rb index b62d5be6b6..d47449fbe6 100644 --- a/bootstraptest/test_knownbug.rb +++ b/bootstraptest/test_knownbug.rb @@ -41,3 +41,28 @@ assert_equal 'ok', %q{ }, '[ruby-dev:32882]' +assert_equal 'ok', %q{ + class C + define_method(:foo) { + if block_given? + :ng + else + :ok + end + } + end + C.new.foo +}, '[ruby-core:14813]' + +assert_equal 'ok', %q{ + class C + define_method(:foo) { + if block_given? + :ok + else + :ng + end + } + end + C.new.foo {} +}, '[ruby-core:14813]' |