Actions
Bug #11964
closed__callee__ in aliased methods defined in a module returns an incorrect value
Description
With Ruby 2.3, instead of following snippet printing bar (as it does with ruby 2.2.4) it prints foo.
If the methods are defined within the class instead of an included module, the snippet prints bar.
module Mod
def foo
__callee__
end
alias_method :bar, :foo
end
class Klass
include Mod
end
a = Klass.new
p a.bar
This appears to be the behavior for both 2.3.0 and ruby 2.3.0dev (2015-11-12 trunk 52550) [x86_64-linux]
Updated by nobu (Nobuyoshi Nakada) over 8 years ago
- Description updated (diff)
- Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONTNEED, 2.3: REQUIRED
Updated by nobu (Nobuyoshi Nakada) over 8 years ago
- Has duplicate Bug #12058: Unexpected value of __callee__ when including a module added
Updated by nobu (Nobuyoshi Nakada) over 8 years ago
- Related to Bug #12176: method equality of aliased methods breakage on 2.3 added
Updated by noahgibbs (Noah Gibbs) over 8 years ago
Looks like this broke in r51126 (GitHub rev 5e8a147480f87f19a8b96ad3fb33a25fb4bb19b9).
Updated by usa (Usaku NAKAMURA) over 8 years ago
- Status changed from Open to Assigned
- Assignee set to ko1 (Koichi Sasada)
Updated by shyouhei (Shyouhei Urabe) about 8 years ago
- Related to Bug #12761: Ruby 2.3.1 has a bug in `Module#alias` and `Module#alias_method` added
Updated by nobu (Nobuyoshi Nakada) almost 8 years ago
- Status changed from Assigned to Closed
Seems fixed by r56592.
Updated by nagachika (Tomoyuki Chikanaga) over 7 years ago
- Backport changed from 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONTNEED, 2.3: REQUIRED to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONE
ruby_2_3 r58148 merged revision(s) 56592.
Actions
Like0
Like0Like0Like0Like0Like0Like0Like0Like0