mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix {Method,UnboundMethod}#super_method for zsuper methods
* We need to resolve the zsuper method first, and then look the super
method of that.
---
proc.c | 25 ++++++++++++-----------
spec/ruby/core/method/super_method_spec.rb | 15 +++-----------
spec/ruby/core/unboundmethod/super_method_spec.rb | 16 ++++++---------
3 files changed, 22 insertions(+), 34 deletions(-)
Add specs for {Method,UnboundMethod}#owner of a zsuper method
---
spec/ruby/core/method/owner_spec.rb | 6 ++++++
spec/ruby/core/unboundmethod/owner_spec.rb | 7 +++++++
2 files changed, 13 insertions(+)
Resolve zsuper method during lookup but preserve owner separately
* See https://bugs.ruby-lang.org/issues/18729#note-34
* See [Bug #18729]
---
proc.c | 109 +++++++++++++++++++++++++----------------------
test/ruby/test_method.rb | 66 +++++++++++++++++++++++-----
2 files changed, 114 insertions(+), 61 deletions(-)
Extend tests for a zsuper method of which the method it resolved to
has been removed
---
test/ruby/test_method.rb | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
Reduce diff to proc.c @
|
||
|---|---|---|
| .. | ||
| fixtures | ||
| shared | ||
| arity_spec.rb | ||
| bind_call_spec.rb | ||
| bind_spec.rb | ||
| clone_spec.rb | ||
| eql_spec.rb | ||
| equal_value_spec.rb | ||
| hash_spec.rb | ||
| inspect_spec.rb | ||
| name_spec.rb | ||
| original_name_spec.rb | ||
| owner_spec.rb | ||
| parameters_spec.rb | ||
| source_location_spec.rb | ||
| super_method_spec.rb | ||
| to_s_spec.rb | ||