summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/mkconstants.rb24
1 files changed, 4 insertions, 20 deletions
diff --git a/ext/socket/mkconstants.rb b/ext/socket/mkconstants.rb
index f260d7bdef..d3eac7f3f1 100644
--- a/ext/socket/mkconstants.rb
+++ b/ext/socket/mkconstants.rb
@@ -93,28 +93,12 @@ ERB.new(<<'EOS', nil, '%').def_method(Object, "gen_name_to_int(str_var, len_var,
}
EOS
-MAYBE_ALIAS = [
- ["AF_UNIX", "AF_LOCAL"],
- ["AF_ISO", "AF_OSI"],
- ["AF_E164", "AF_ISDN"],
- ["AF_NS", "AF_IPX"],
-]
-
def each_alias(pat)
- h = {}
- each_name(pat) {|name|
- h[name] = [name]
- }
- MAYBE_ALIAS.each {|names|
- a = []
- names.each {|n|
- a << n if h.delete n
- }
- h[a.first] = a
- }
- h.each_value {|names|
- yield names
+ names = []
+ each_name(pat) {|n|
+ names << n
}
+ yield names
end
ERB.new(<<'EOS', nil, '%').def_method(Object, "gen_int_to_name(int_var, pat)")