diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | ext/socket/option.c | 2 | ||||
-rw-r--r-- | ext/socket/raddrinfo.c | 1 |
3 files changed, 11 insertions, 0 deletions
@@ -1,3 +1,11 @@ +Mon Feb 2 23:43:00 2009 Tanaka Akira <akr@fsij.org> + + * ext/socket/raddrinfo.c (Init_addrinfo): add AddrInfo#to_s as an + alias of AddrInfo#to_sockaddr. + + * ext/socket/option.c (Init_sockopt): add Socket::Option#to_s as an + alias of Socket::Option#data. + Mon Feb 2 21:04:13 2009 Yukihiro Matsumoto <matz@ruby-lang.org> * array.c (rb_ary_sort_by_bang): RDoc update. [ruby-core:21742] diff --git a/ext/socket/option.c b/ext/socket/option.c index 96dd0f5903..8fcee4c0c7 100644 --- a/ext/socket/option.c +++ b/ext/socket/option.c @@ -371,5 +371,7 @@ Init_sockopt(void) rb_define_method(rb_cSockOpt, "int", sockopt_int, 0); rb_define_method(rb_cSockOpt, "unpack", sockopt_unpack, 1); + + rb_define_method(rb_cSockOpt, "to_s", sockopt_data, 0); /* compatibility for ruby before 1.9.2 */ } diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c index fb8d3418fc..b2da37c8e2 100644 --- a/ext/socket/raddrinfo.c +++ b/ext/socket/raddrinfo.c @@ -2114,6 +2114,7 @@ Init_addrinfo(void) #endif rb_define_method(rb_cAddrInfo, "to_sockaddr", addrinfo_to_sockaddr, 0); + rb_define_method(rb_cAddrInfo, "to_s", addrinfo_to_sockaddr, 0); /* compatibility for ruby before 1.9.2 */ rb_define_method(rb_cAddrInfo, "getnameinfo", addrinfo_getnameinfo, -1); |