diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | ext/socket/ancdata.c | 2 | ||||
-rw-r--r-- | ext/socket/mkconstants.rb | 1 | ||||
-rw-r--r-- | ext/socket/option.c | 2 |
4 files changed, 12 insertions, 2 deletions
@@ -1,3 +1,12 @@ +Tue Feb 10 01:02:16 2009 Tanaka Akira <akr@fsij.org> + + * ext/socket/mkconstants.rb: generate intern_family_noprefix. + + * ext/socket/option.c (sockopt_inspect): use intern_family_noprefix + not to show AF_ prefix. + + * ext/socket/ancdata.c (ancillary_inspect): ditto. + Mon Feb 9 23:21:29 2009 Tanaka Akira <akr@fsij.org> * ext/socket/constants.c (level_arg): use unknown_level_to_int for diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c index 27b15b25fc..c8535148e4 100644 --- a/ext/socket/ancdata.c +++ b/ext/socket/ancdata.c @@ -599,7 +599,7 @@ ancillary_inspect(VALUE self) ret = rb_sprintf("#<%s: ", rb_obj_classname(self)); - family_id = intern_family(family); + family_id = intern_family_noprefix(family); if (family_id) rb_str_cat2(ret, rb_id2name(family_id)); else diff --git a/ext/socket/mkconstants.rb b/ext/socket/mkconstants.rb index d3058f11f0..3b8e24603f 100644 --- a/ext/socket/mkconstants.rb +++ b/ext/socket/mkconstants.rb @@ -253,6 +253,7 @@ def_name_to_int("shutdown_how_to_int", /\ASHUT_/, "SHUT_") def_name_to_int("scm_optname_to_int", /\ASCM_/, "SCM_") def_intern('intern_family', /\AAF_/) +def_intern('intern_family_noprefix', /\AAF_/, "AF_") def_intern('intern_protocol_family', /\APF_/) def_intern('intern_socktype', /\ASOCK_/) def_intern('intern_ipproto', /\AIPPROTO_/) diff --git a/ext/socket/option.c b/ext/socket/option.c index c0e28b7c3a..45559b6c00 100644 --- a/ext/socket/option.c +++ b/ext/socket/option.c @@ -302,7 +302,7 @@ sockopt_inspect(VALUE self) ret = rb_sprintf("#<%s: ", rb_obj_classname(self)); - family_id = intern_family(family); + family_id = intern_family_noprefix(family); if (family_id) rb_str_cat2(ret, rb_id2name(family_id)); else |