Utilize more idiomatic naming conventions for Socket class methods #320

Closed
wants to merge 7 commits into
from

Projects

None yet

3 participants

@adkron
adkron commented May 29, 2013

The current names of methods like Socket.gethostname are not very idiomatic of Ruby. In order to maintain backwards compatibility we decided to alias to the more idiomatic names.

@adkron
@zph

zph added some commits May 28, 2013
@zph zph Alias Socket.gethostname to Socket.hostname
This alias uses a more idiomatic naming convention.

Amos King (@adkron) <amos.l.king@gmail.com>
Zander Hill (@_ZPH) <zander@civet.ws>
7c06a46
@zph zph Alias Socket.gethostbyname to Socket.get_host_by_name
This alias uses a more idiomatic naming convention.

Amos King (@adkron) <amos.l.king@gmail.com>
Zander Hill (@_ZPH) <zander@civet.ws>
43f935e
@zph zph Alias Socket.gethostbyaddr to Socket.get_host_by_address
This alias uses a more idiomatic naming convention.

Amos King (@adkron) <amos.l.king@gmail.com>
Zander Hill (@_zph) <zander@civet.ws>
c1abf35
@zph zph Alias Socket.getservbyname to Socket.get_service_by_name
This alias uses a more idiomatic naming convention.

Amos King (@adkron) <amos.l.king@gmail.com>
Zander Hill (@_zph) <zander@civet.ws>
61fc8fa
@zph zph Alias Socket.getservbyport to Socket.get_service_by_port
This alias uses a more idiomatic naming convention.

Amos King (@adkron) <amos.l.king@gmail.com>
Zander Hill (@_ZPH) <zander@civet.ws>
af0254a
@zph zph Alias Socket.getaddrinfo to Socket.get_address_info
This alias uses a more idiomatic naming convention

Amos King (@adkron) <amos.l.king@gmail.com>
Zander Hill (@_zph) <zander@civet.ws>
f4c6e3a
@zph zph Alias Socket.getnameinfo to Socket.get_name_info
This alias uses a more idiomatic naming convention.

Amos King (@adkron) <amos.l.king@gmail.com>
Zander Hill (@_ZPH) <zander@civet.ws>
9f5aedb
@zzak
Member
zzak commented May 29, 2013

These methods are named after POSIX standard

@zzak zzak closed this May 29, 2013
@adkron
adkron commented May 29, 2013

@zzak I understand that they are named after the POSIX standards. That is why we only aliased the methods. I think this should be reopened for discussion.

@zzak
Member
zzak commented May 29, 2013

Please open a feature request on http://bugs.ruby-lang.org/ for discussion.

@adkron
adkron commented May 29, 2013

@zzak thanks for pointing me in the right direction.

@zph created a ticket at https://bugs.ruby-lang.org/issues/8459

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment