summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2012-06-02 00:55:33 -0700
committerYukihiro "Matz" Matsumoto <[email protected]>2012-06-02 00:55:33 -0700
commit7752d2ab43088aeb5e43d1dab764cba7428cd40c (patch)
tree46c66b28b763df0f985219211125b77e96556fe9
parentca6c55df58fdc5845ed24d8c44a46ab6364b8093 (diff)
parent8804c7db6585d7cf3eda735f4758007704f237af (diff)
downloadmruby-7752d2ab43088aeb5e43d1dab764cba7428cd40c.tar.gz
mruby-7752d2ab43088aeb5e43d1dab764cba7428cd40c.zip
Merge pull request #221 from bovi/test-for-issue211
Add Test Case for issue #211
-rw-r--r--test/t/kernel.rb12
1 files changed, 11 insertions, 1 deletions
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