summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMasamitsu MURASE <[email protected]>2012-07-17 00:56:18 +0900
committerMasamitsu MURASE <[email protected]>2012-07-17 00:56:18 +0900
commit8020c280aa88354d797bdaf754c7beeb42dabab4 (patch)
tree26c13f31ad6d4b533923844b18add0aa2b844681
parentba08a2b9dddf97c84a73ab72f708e2bfef2d6b82 (diff)
downloadmruby-8020c280aa88354d797bdaf754c7beeb42dabab4.tar.gz
mruby-8020c280aa88354d797bdaf754c7beeb42dabab4.zip
Add test for Kernel#extend.
-rw-r--r--test/t/kernel.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/t/kernel.rb b/test/t/kernel.rb
index 5aa7672d7..4f1d2b42f 100644
--- a/test/t/kernel.rb
+++ b/test/t/kernel.rb
@@ -187,6 +187,21 @@ assert('Kernel#dup', '15.3.1.3.9') do
c.respond_to?(:test) == false
end
+assert('Kernel#extend', '15.3.1.3.13') do
+ class Test4ExtendClass
+ end
+
+ module Test4ExtendModule
+ def test_method; end
+ end
+
+ a = Test4ExtendClass.new
+ a.extend(Test4ExtendModule)
+ b = Test4ExtendClass.new
+
+ a.respond_to?(:test_method) == true && b.respond_to?(:test_method) == false
+end
+
assert('Kernel#global_variables', '15.3.1.3.14') do
global_variables.class == Array
end