[#74190] [Ruby trunk Feature#12134] Comparison between `true` and `false` — duerst@...
Issue #12134 has been updated by Martin D端rst.
3 messages
2016/03/07
[#74269] Type systems for Ruby — Rob Blanco <ml@...>
Dear ruby-core,
5 messages
2016/03/10
[#74395] [Ruby trunk Feature#12142] Hash tables with open addressing — shyouhei@...
Issue #12142 has been updated by Shyouhei Urabe.
3 messages
2016/03/17
[ruby-core:74328] [Ruby trunk Bug#12058] Unexpected value of __callee__ when including a module
From:
nobu@...
Date:
2016-03-15 05:56:40 UTC
List:
ruby-core #74328
Issue #12058 has been updated by Nobuyoshi Nakada. Description updated ---------------------------------------- Bug #12058: Unexpected value of __callee__ when including a module https://bugs.ruby-lang.org/issues/12058#change-57450 * Author: Jesse Sielaff * Status: Open * Priority: Normal * Assignee: * ruby -v: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- I noticed a surprising behavior when invoking `__callee__` in an aliased method. When invoked via a method created by `alias_method`, `__callee__` ignores the name of the old method (here `xxx`) and returns the name of the new method, as below: ~~~ruby class Foo def xxx() __callee__ end alias_method :foo, :xxx end Foo.new.foo # => :foo ~~~ This behavior holds even when `xxx` is inherited from a superclass: ~~~ruby class Sup def xxx() __callee__ end end class Bar < Sup alias_method :bar, :xxx end Bar.new.bar # => :bar ~~~ Given both of the above, I would expect that the same behavior would hold when `xxx` is included via a module. However, that is not the case: ~~~ruby module Mod def xxx() __callee__ end end class Baz include Mod alias_method :baz, :xxx end Baz.new.baz # => :xxx ~~~ I expect the return value to be `:baz`, not `:xxx`. Is this a bug, or is there an important difference between superclass inheritance and module inclusion that I've failed to grasp here? Origin: http://stackoverflow.com/questions/35281623/unexpected-value-of-callee-when-including-a-module-is-this-a-ruby-bug -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>