diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-07-26 07:47:50 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-07-26 07:47:50 +0000 |
commit | 52ecaae5b68384132da88f798c9282e64eca4e77 (patch) | |
tree | 0e2d1142ff980fb67af8168a54e1ecb10d97832d /sample/mkproto.rb | |
parent | d365d1f568af2a0651959a9eb928435d3a733acb (diff) | |
download | ruby-52ecaae5b68384132da88f798c9282e64eca4e77.tar.gz |
* sample/mkproto.rb: ditto and fix bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/mkproto.rb')
-rw-r--r-- | sample/mkproto.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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 |