mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
810dd43a20
commit
97ba0d4aa7
4 changed files with 12 additions and 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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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_/)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue