From e41936441bf9fcab9fb4d8ceb70cc73d2a38c9c0 Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 6 Apr 2010 03:01:52 +0000 Subject: Surpress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- sample/mkproto.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sample') diff --git a/sample/mkproto.rb b/sample/mkproto.rb index 754ca2dff2..6e7fc0f788 100644 --- a/sample/mkproto.rb +++ b/sample/mkproto.rb @@ -1,20 +1,20 @@ $/ = nil while line = gets() - if /^((void|VALUE|int|char *\*|ID|struct [\w_]+ *\*|st_table *\*) *)?\n([\w\d_]+)\(.*\)\n\s*((.+;\n)*)\{/ =~ line + if /^((void|VALUE|int|char *\*|ID|struct \w+ *\*|st_table *\*) *)?\n(\w+)\(.*\)\n\s*((.+;\n)*)\{/ =~ line line = $' printf "%s %s(", $2, $3 args = [] for arg in $4.split(/;\n\s*/) arg.gsub!(/ +/, ' ') if arg =~ /,/ - if arg =~ /(([^*]+) *\** *[\w\d_]+),/ + if arg =~ /(([^*]+) *\** *\w+),/ type = $2.strip args.push $1.strip arg = $' else type = "" end - while arg.sub!(/(\** *[\w\d_]+)(,|$)/, "") && $~ + while arg.sub!(/(\** *\w+)(,|$)/, "") && $~ args.push type + " " + $1.strip end else -- cgit v1.2.3