summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/ancdata.c2
-rw-r--r--ext/socket/mkconstants.rb1
-rw-r--r--ext/socket/option.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c
index 27b15b25fc4..c8535148e4a 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 d3058f11f0e..3b8e24603fa 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 c0e28b7c3a3..45559b6c001 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