mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-01 17:39:54 +08:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user