summaryrefslogtreecommitdiff
path: root/test/ruby/test_defined.rb
diff options
context:
space:
mode:
authorNARUSE, Yui <[email protected]>2021-02-01 19:16:54 +0900
committerNARUSE, Yui <[email protected]>2021-02-01 19:16:54 +0900
commit147453ad1e85bc94506c269e363e736675946908 (patch)
tree886002638fffb322541b4e99ce642893f9a760c2 /test/ruby/test_defined.rb
parent5501e1038eb1f606d4b941115fcc45e6e01a0de4 (diff)
merge revision(s) 85b5d4c8bf4cdcba4f1af65f2bc0c8ac716cb795: [Backport #17509]
Revert "[Bug #11213] let defined?(super) call respond_to_missing?" This reverts commit fac2498e0299f13dffe4f09a7dd7657fb49bf643 for now, due to [Bug #17509], the breakage in the case `super` is called in `respond_to?`. --- internal/vm.h | 2 +- test/ruby/test_defined.rb | 33 --------------------------------- vm_insnhelper.c | 4 ++-- vm_method.c | 12 +++++++----- 4 files changed, 10 insertions(+), 41 deletions(-)
Diffstat (limited to 'test/ruby/test_defined.rb')
-rw-r--r--test/ruby/test_defined.rb33
1 files changed, 0 insertions, 33 deletions
diff --git a/test/ruby/test_defined.rb b/test/ruby/test_defined.rb
index 87f02055ab..b22db700da 100644
--- a/test/ruby/test_defined.rb
+++ b/test/ruby/test_defined.rb
@@ -302,39 +302,6 @@ class TestDefined < Test::Unit::TestCase
assert_nil(defined?(TestDefined::Object))
end
- def test_super_with_method_missing
- c0 = EnvUtil.labeled_class("C0") do
- attr_reader :calls
-
- def initialize
- @calls = []
- end
-
- def method_missing(*args)
- @calls << [:method_missing, *args]
- end
-
- def respond_to_missing?(*args)
- @calls << [:respond_to_missing?, *args]
- true
- end
- end
-
- c1 = EnvUtil.labeled_class("C1", c0) do
- def foo
- super
- defined?(super)
- end
- end
-
- c = c1.new
- assert_not_nil(c.foo)
- assert_equal([
- [:method_missing, :foo],
- [:respond_to_missing?, :foo, true],
- ], c.calls)
- end
-
class RefinedClass
end