[#61822] Plan Developers Meeting Japan April 2014 — Zachary Scott <e@...>

I would like to request developers meeting around April 17 or 18 in this month.

14 messages 2014/04/03
[#61825] Re: Plan Developers Meeting Japan April 2014 — Urabe Shyouhei <shyouhei@...> 2014/04/03

It's good if we have a meeting then.

[#61826] Re: Plan Developers Meeting Japan April 2014 — Zachary Scott <e@...> 2014/04/03

Regarding openssl issues, I’ve discussed possible meeting time with Martin last month and he seemed positive.

[#61833] Re: Plan Developers Meeting Japan April 2014 — Martin Bo煬et <martin.bosslet@...> 2014/04/03

Hi,

[ruby-core:61991] [ruby-trunk - Bug #9443] Pepended methods are skipped if calling alias

From: transfire@...
Date: 2014-04-11 18:53:26 UTC
List: ruby-core #61991
Issue #9443 has been updated by Thomas Sawyer.


alias in Ruby really means "copy method". It would be nice if there were a way to truly alias, such that the two names refer to same definition.


----------------------------------------
Bug #9443: Pepended methods are skipped if calling alias
https://bugs.ruby-lang.org/issues/9443#change-46182

* Author: Brian Cardarella
* Status: Rejected
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: 2.1.0
* Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
I am unsure if this is related to https://bugs.ruby-lang.org/issues/7842 as that issue specifically mentions the user of "super" which my example code does not use. Anyway, here is the test to recreate:

```ruby
require 'test/unit'

module A
  def foo
    'foo2'
  end
end

class B
  def foo
    'foo1'
  end
  alias_method :bar, :foo
end

B.send(:prepend, A)

class AliasTest < Test::Unit::TestCase
  def test_no_alias
    assert_equal 'foo2', B.new.foo
  end

  def test_with_alias
    assert_equal 'foo2', B.new.bar
  end
end
```

`test_with_alias` fails and will only call the original "foo" method.

I have confirmed this on Ruby 2.0.0-p353 & 2.1.0



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

In This Thread

Prev Next