diff options
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_eval.rb | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/bootstraptest/test_eval.rb b/bootstraptest/test_eval.rb index aab1a7b1a4..bf7478006d 100644 --- a/bootstraptest/test_eval.rb +++ b/bootstraptest/test_eval.rb @@ -264,24 +264,18 @@ assert_equal 'ok', %q{ }, '[ruby-core:16794]' assert_equal 'ok', %q{ - begin - nil.instance_eval { - def a() :a end - } - rescue TypeError - :ok - end -}, '[ruby-core:16796]' + nil.instance_eval { + def defd_using_instance_eval() :ok end + } + nil.defd_using_instance_eval +}, '[ruby-core:28324]' assert_equal 'ok', %q{ - begin - nil.instance_exec { - def a() :a end - } - rescue TypeError - :ok - end -}, '[ruby-core:16796]' + nil.instance_exec { + def defd_using_instance_exec() :ok end + } + nil.defd_using_instance_exec +}, '[ruby-core:28324]' assert_normal_exit %q{ eval("", method(:proc).call {}.binding) |