Project

General

Profile

Actions

Feature #17674

closed

Proposal: `Method#source_location` or `Method#owner` for refined methods

Added by AlexWayfer (Alexander Popov) over 3 years ago. Updated over 3 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:102761]

Description

Inspired by https://bugs.ruby-lang.org/issues/15504#note-17

I'm working on a gem with Ruby refinements, and some methods are invented in new Ruby versions like 2.5 or 3.0, and I'd like to define in this gem should I refine a method or not.

So… current behavior of Method#source_location returns nil for core and/or refined methods. I think, refinements should be caught by this method. Also I didn't know about Method#owner, but it can be a case for refinements too.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0