[#59462] [ruby-trunk - Bug #9342][Open] [PATCH] SizedQueue#clear does not notify waiting threads in Ruby 1.9.3 — "jsc (Justin Collins)" <redmine@...>

9 messages 2014/01/02

[#59466] [ruby-trunk - Bug #9343][Open] [PATCH] SizedQueue#max= wakes up waiters properly — "normalperson (Eric Wong)" <normalperson@...>

11 messages 2014/01/02

[#59498] [ruby-trunk - Bug #9352][Open] [BUG] rb_sys_fail_str(connect(2) for [fe80::1%lo0]:3000) - errno == 0 — "kain (Claudio Poli)" <claudio@...>

10 messages 2014/01/03

[#59516] [ruby-trunk - Bug #9356][Open] TCPSocket.new does not seem to handle INTR — "charliesome (Charlie Somerville)" <charliesome@...>

48 messages 2014/01/03

[#59538] [ruby-trunk - Feature #9362][Assigned] Minimize cache misshit to gain optimal speed — "shyouhei (Shyouhei Urabe)" <shyouhei@...>

33 messages 2014/01/03
[#59541] Re: [ruby-trunk - Feature #9362][Assigned] Minimize cache misshit to gain optimal speed — Eric Wong <normalperson@...> 2014/01/04

Hi, I noticed a trivial typo in array.c, and it fails building struct.c

[#59582] Re: [ruby-trunk - Feature #9362][Assigned] Minimize cache misshit to gain optimal speed — SASADA Koichi <ko1@...> 2014/01/06

Intersting challenge.

[#59583] [ruby-trunk - Bug #9367][Open] REXML::XmlDecl doesn't use user specified quotes — "bearmini (Takashi Oguma)" <bear.mini@...>

12 messages 2014/01/06

[#59642] [ruby-trunk - Bug #9384][Open] Segfault in ruby 2.1.0p0 — "cbliard (Christophe Bliard)" <christophe.bliard@...>

11 messages 2014/01/08

[#59791] About unmarshallable DRb objects life-time — Rodrigo Rosenfeld Rosas <rr.rosas@...>

A while ago I created a proof-of-concept that I intended to use in my

16 messages 2014/01/15
[#59794] Re: About unmarshallable DRb objects life-time — Eric Hodel <drbrain@...7.net> 2014/01/15

On 15 Jan 2014, at 11:58, Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com> =

[#59808] Re: About unmarshallable DRb objects life-time — Rodrigo Rosenfeld Rosas <rr.rosas@...> 2014/01/16

Em 15-01-2014 19:42, Eric Hodel escreveu:

[#59810] Re: About unmarshallable DRb objects life-time — Eric Hodel <drbrain@...7.net> 2014/01/16

On 16 Jan 2014, at 02:15, Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com> =

[#59826] Re: About unmarshallable DRb objects life-time — Rodrigo Rosenfeld Rosas <rr.rosas@...> 2014/01/17

Em 16-01-2014 19:43, Eric Hodel escreveu:

[ruby-core:60251] [ruby-trunk - Feature #9185] Add alias_class_method or class_alias functionality

From: shibata.hiroshi@...
Date: 2014-01-30 05:53:17 UTC
List: ruby-core #60251
Issue #9185 has been updated by Hiroshi SHIBATA.

Target version changed from 2.1.0 to current: 2.2.0

----------------------------------------
Feature #9185: Add alias_class_method or class_alias functionality
https://bugs.ruby-lang.org/issues/9185#change-44727

* Author: Robert A. Heiler
* Status: Open
* Priority: Low
* Assignee:=20
* Category:=20
* Target version: current: 2.2.0
----------------------------------------
Hi core team,

First drink a Calpis (=E3=82=AB=E3=83=AB=E3=83=94=E3=82=B9 Karupisu) before=
 reading on :-)

Now, my proposal is to add a slight new feature that is mostly one of conve=
nience.

We have two ways to use aliases:

(1) alias
(2) alias_method

But are similar but not 100% the same.

Now this works all fine and nice.

But how to define a class method? Well, simple:

  class Foo; def self.hi; puts 'hi'; end; end; Foo.hi

But how can we make an alias to this class method?

Well, this is ugly - here is one way:

  class Foo; class << self; def ho; hi; end;end;end

Is this readable to you?

Using alias would be more readable.

Ok, we can simplify it by using alias:

  class Foo; class << self; alias ho hi; end;end

But I don't like the class << self there, just to make
a single class alias.

I thus propose a new method called:

class_alias

The above could then be rewritte like so perhaps:
  class Foo; class_alias :ho, :hi; end # I guess this would be more akin to=
 alias_method

If the name is bad, it could be:

  alias_class_method

Perhaps. Anyway, the name is not so important, I am sure a good name can be=
 found,
but I wonder if this would be a good feature to add or not.

Thanks for reading!



--=20
http://bugs.ruby-lang.org/

In This Thread

Prev Next