From 8804c7db6585d7cf3eda735f4758007704f237af Mon Sep 17 00:00:00 2001 From: Daniel Bovensiepen Date: Sat, 2 Jun 2012 01:39:53 +0800 Subject: Add Test Case for issue #211 --- test/t/kernel.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/t/kernel.rb b/test/t/kernel.rb index cd1f2d99e..847f1baeb 100644 --- a/test/t/kernel.rb +++ b/test/t/kernel.rb @@ -112,7 +112,17 @@ assert('Kernel#respond_to?', '15.3.1.2.43') do respond_to? :nil? end -# TODO at the moment doesn't comply to ISO assert('Kernel#send', '15.3.1.2.44') do +assert('Kernel#send', '15.3.1.2.44') do + # test with block + l = send(:lambda) do + true + end + l.call and l.class == Proc and + # test with argument + send(:respond_to?, :nil?) and + # test without argument and without block + send(:public_methods).class == Array +end assert('Kernel#singleton_methods', '15.3.1.2.45') do singleton_methods.class == Array -- cgit v1.2.3