Within a method at runtime, is there a way to know if that method has been called via super in a subclass? E.g.
super
module SuperDetector def via_s
Edit Improved, following Stefan's suggestion.
module SuperDetector def via_super? m0, m1 = caller_locations[0].base_label, caller_locations[1]&.base_label m0 == m1 and (method(m0).owner rescue nil) == (method(m1).owner rescue nil) end end