ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:82333] [Ruby trunk Bug#13800] Possible regression of Object#method in Ruby 2.3+ for aliases
       [not found] <redmine.issue-13800.20170810172758@ruby-lang.org>
@ 2017-08-10 17:27 ` jeffrey.manian
  2017-08-11  2:19 ` [ruby-core:82342] [Ruby trunk Bug#13800][Rejected] " nobu
  1 sibling, 0 replies; 2+ messages in thread
From: jeffrey.manian @ 2017-08-10 17:27 UTC (permalink / raw
  To: ruby-core

Issue #13800 has been reported by jmanian (Jeff Manian).

----------------------------------------
Bug #13800: Possible regression of Object#method in Ruby 2.3+ for aliases
https://bugs.ruby-lang.org/issues/13800

* Author: jmanian (Jeff Manian)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.2.3, 2.2.7, 2.3.0, 2.3.3, 2.3.4, 2.4.1
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
The behavior of `Object#method` changed in 2.3 when using it to compare aliases. The change is best illustrated below:

~~~ ruby
module Foo
  def foo
  end
  alias_method :foo_foo, :foo
end

class Bar
  include Foo
  alias_method :bar, :foo
end

bar = Bar.new
bar.method(:foo) == bar.method(:bar)
# true in Ruby 2.2
# false in Ruby 2.3 and 2.4

bar.method(:foo) == bar.method(:foo_foo)
# true in Ruby 2.2, 2.3, 2.4
~~~

Was this an intentional change in 2.3 or a regression?
I tested this with 2.2.3, 2.2.7, 2.3.0, 2.3.3, 2.3.4, and 2.4.1.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [ruby-core:82342] [Ruby trunk Bug#13800][Rejected] Possible regression of Object#method in Ruby 2.3+ for aliases
       [not found] <redmine.issue-13800.20170810172758@ruby-lang.org>
  2017-08-10 17:27 ` [ruby-core:82333] [Ruby trunk Bug#13800] Possible regression of Object#method in Ruby 2.3+ for aliases jeffrey.manian
@ 2017-08-11  2:19 ` nobu
  1 sibling, 0 replies; 2+ messages in thread
From: nobu @ 2017-08-11  2:19 UTC (permalink / raw
  To: ruby-core

Issue #13800 has been updated by nobu (Nobuyoshi Nakada).

Status changed from Open to Rejected

It's intentional.
See https://bugs.ruby-lang.org/issues/7613#change-35118

----------------------------------------
Bug #13800: Possible regression of Object#method in Ruby 2.3+ for aliases
https://bugs.ruby-lang.org/issues/13800#change-66136

* Author: jmanian (Jeff Manian)
* Status: Rejected
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.2.3, 2.2.7, 2.3.0, 2.3.3, 2.3.4, 2.4.1
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
The behavior of `Object#method` changed in 2.3 when using it to compare aliases. The change is best illustrated below:

~~~ ruby
module Foo
  def foo
  end
  alias_method :foo_foo, :foo
end

class Bar
  include Foo
  alias_method :bar, :foo
end

bar = Bar.new
bar.method(:foo) == bar.method(:bar)
# true in Ruby 2.2
# false in Ruby 2.3 and 2.4

bar.method(:foo) == bar.method(:foo_foo)
# true in Ruby 2.2, 2.3, 2.4
~~~

Was this an intentional change in 2.3 or a regression?
I tested this with 2.2.3, 2.2.7, 2.3.0, 2.3.3, 2.3.4, and 2.4.1.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-11  2:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-13800.20170810172758@ruby-lang.org>
2017-08-10 17:27 ` [ruby-core:82333] [Ruby trunk Bug#13800] Possible regression of Object#method in Ruby 2.3+ for aliases jeffrey.manian
2017-08-11  2:19 ` [ruby-core:82342] [Ruby trunk Bug#13800][Rejected] " nobu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).