From 52ecaae5b68384132da88f798c9282e64eca4e77 Mon Sep 17 00:00:00 2001 From: eban Date: Fri, 26 Jul 2002 07:47:50 +0000 Subject: * sample/mkproto.rb: ditto and fix bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- sample/mkproto.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sample/mkproto.rb') diff --git a/sample/mkproto.rb b/sample/mkproto.rb index e1d49be3e3..754ca2dff2 100644 --- a/sample/mkproto.rb +++ b/sample/mkproto.rb @@ -1,11 +1,11 @@ $/ = nil while line = gets() if /^((void|VALUE|int|char *\*|ID|struct [\w_]+ *\*|st_table *\*) *)?\n([\w\d_]+)\(.*\)\n\s*((.+;\n)*)\{/ =~ line - $_ = $' + line = $' printf "%s %s(", $2, $3 args = [] for arg in $4.split(/;\n\s*/) - arg.gsub! ' +', ' ' + arg.gsub!(/ +/, ' ') if arg =~ /,/ if arg =~ /(([^*]+) *\** *[\w\d_]+),/ type = $2.strip -- cgit v1.2.3