From 595820e2de1c7f532cb61ded155b1674b72fe7ea Mon Sep 17 00:00:00 2001 From: Watson Date: Thu, 1 Nov 2012 13:14:58 +0900 Subject: [PATCH] remove the ')' in method declaration which has the handler argument Because the following method is converted with strange syntax - (UIBackgroundTaskIdentifier)beginBackgroundTaskWithExpirationHandler:(void (^)(void))handler after converting: def beginBackgroundTaskWithExpirationHandler()handler); end --- doc/docset.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/docset.rb b/doc/docset.rb index 8f888f8e..3727a64f 100644 --- a/doc/docset.rb +++ b/doc/docset.rb @@ -109,7 +109,7 @@ class DocsetGenerator is_class_method = decl.match(/^\s*\+/) != nil decl.sub!(/^\s*[\+\-]/, '') # Remove method qualifier. decl.sub!(/;\s*$/, '') - sel_parts = decl.gsub(/\([^)]+\)/, '').split.map { |x| x.split(':') } + sel_parts = decl.gsub(/\([^)]+\)+/, '').split.map { |x| x.split(':') } head = sel_parts.shift code << " def #{is_class_method ? 'self.' : ''}#{head[0]}(" code << "#{head[1]}" if head.size > 1