lib/yard/handlers/ruby/legacy/exception_handler.rb in yard-0.6.1 vs lib/yard/handlers/ruby/legacy/exception_handler.rb in yard-0.6.2

- old
+ new

@@ -4,10 +4,10 @@ process do return unless owner.is_a?(MethodObject) # Only methods yield return if owner.has_tag?(:raise) - if klass = statement.tokens.to_s[/^raise[\(\s]*(#{NAMESPACEMATCH})(?:\)|,|\s|(?:\s*(?:\.|\:\:)\s*)?new|$)/, 1] + if klass = statement.tokens.to_s[/^raise[\(\s]*(#{NAMESPACEMATCH})\s*(?:\)|,|\s(?:if|unless|until)|;|(?:(?:\.|\:\:)\s*)?new|$)/, 1] owner.docstring.add_tag YARD::Tags::Tag.new(:raise, '', klass) end end end \ No newline at end of file