summaryrefslogtreecommitdiffhomepage
path: root/test/t/module.rb
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2018-09-01 11:20:30 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2018-09-01 11:20:30 +0900
commitb80e0ef7428b613a682da4d2a251c8beb24d6dd2 (patch)
treed47427ac2f9bb454f9a47b79d6767ee27bd0c8f0 /test/t/module.rb
parent593c12a5cd670cfdb45741377236207a56541d37 (diff)
downloadmruby-b80e0ef7428b613a682da4d2a251c8beb24d6dd2.tar.gz
mruby-b80e0ef7428b613a682da4d2a251c8beb24d6dd2.zip
Move `Kernel#send` to `mruby-metaprog` gem.
But `BasicObject#__send__` is still available from the core.
Diffstat (limited to 'test/t/module.rb')
-rw-r--r--test/t/module.rb106
1 files changed, 53 insertions, 53 deletions
diff --git a/test/t/module.rb b/test/t/module.rb
index fda375721..78cb5d07f 100644
--- a/test/t/module.rb
+++ b/test/t/module.rb
@@ -536,61 +536,61 @@ end
#end
# mruby has no visibility control
- assert 'Module#prepend visibility' do
- bug8005 = '[ruby-core:53106] [Bug #8005]'
- c = Class.new do
- prepend Module.new {}
- def foo() end
- protected :foo
- end
- a = c.new
- assert_true a.respond_to?(:foo), bug8005
- assert_nothing_raised(bug8005) {a.send :foo}
- end
+ # assert 'Module#prepend visibility' do
+ # bug8005 = '[ruby-core:53106] [Bug #8005]'
+ # c = Class.new do
+ # prepend Module.new {}
+ # def foo() end
+ # protected :foo
+ # end
+ # a = c.new
+ # assert_true a.respond_to?(:foo), bug8005
+ # assert_nothing_raised(bug8005) {a.send :foo}
+ # end
# mruby has no visibility control
- assert 'Module#prepend inherited visibility' do
- bug8238 = '[ruby-core:54105] [Bug #8238]'
- module Test4PrependVisibilityInherited
- class A
- def foo() A; end
- private :foo
- end
- class B < A
- public :foo
- prepend Module.new
- end
- end
- assert_equal(Test4PrependVisibilityInherited::A, Test4PrependVisibilityInherited::B.new.foo, "#{bug8238}")
- end
-
- assert 'Module#prepend super in alias' do
- skip "super does not currently work in aliased methods"
- bug7842 = '[Bug #7842]'
-
- p = labeled_module("P") do
- def m; "P"+super; end
- end
-
- a = labeled_class("A") do
- def m; "A"; end
- end
-
- b = labeled_class("B", a) do
- def m; "B"+super; end
- alias m2 m
- prepend p
- alias m3 m
- end
-
- assert_nothing_raised do
- assert_equal("BA", b.new.m2, bug7842)
- end
-
- assert_nothing_raised do
- assert_equal("PBA", b.new.m3, bug7842)
- end
- end
+ # assert 'Module#prepend inherited visibility' do
+ # bug8238 = '[ruby-core:54105] [Bug #8238]'
+ # module Test4PrependVisibilityInherited
+ # class A
+ # def foo() A; end
+ # private :foo
+ # end
+ # class B < A
+ # public :foo
+ # prepend Module.new
+ # end
+ # end
+ # assert_equal(Test4PrependVisibilityInherited::A, Test4PrependVisibilityInherited::B.new.foo, "#{bug8238}")
+ # end
+
+ # assert 'Module#prepend super in alias' do
+ # skip "super does not currently work in aliased methods"
+ # bug7842 = '[Bug #7842]'
+
+ # p = labeled_module("P") do
+ # def m; "P"+super; end
+ # end
+
+ # a = labeled_class("A") do
+ # def m; "A"; end
+ # end
+
+ # b = labeled_class("B", a) do
+ # def m; "B"+super; end
+ # alias m2 m
+ # prepend p
+ # alias m3 m
+ # end
+
+ # assert_nothing_raised do
+ # assert_equal("BA", b.new.m2, bug7842)
+ # end
+
+ # assert_nothing_raised do
+ # assert_equal("PBA", b.new.m3, bug7842)
+ # end
+ # end
assert 'Module#prepend each class' do
m = labeled_module("M")