summaryrefslogtreecommitdiff
path: root/builtin.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2022-12-03 05:55:33 +0900
committerKoichi Sasada <ko1@atdot.net>2022-12-03 08:53:12 +0900
commit59e389af2893c0fcf8b2cfa008c9a16825bf56ff (patch)
tree31224e3498843912e2fc8734710e03224aaca21c /builtin.c
parent7161bf34e161979b97dbc0c1f7450c195faffcfe (diff)
downloadruby-59e389af2893c0fcf8b2cfa008c9a16825bf56ff.tar.gz
UnboundMethod only refer defined_class
UnboundMethod records caller's class, like `D` or `E` on the following case: ```ruby class C def foo = :foo end class D < C end class E < C end d = D.instance_method(:foo) e = E.instance_method(:foo) ``` But `d` and `e` only refers `C#foo` so that UnboundMethod doesn't record `D` or `E`. This behavior changes the following methods: * `UnboundMethod#inspect` (doesn't show caller's class) * `UnboundMethod#==` (`d == e` for example) fix https://bugs.ruby-lang.org/issues/18798
Diffstat (limited to 'builtin.c')
0 files changed, 0 insertions, 0 deletions