<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -175,7 +175,9 @@ module YARD
       # @param [RubyToken::Token] tk the token to process
       # @return [Boolean] whether or not +tk+ was processed as an initial comment
       def process_initial_comment(tk)
-        @comments = nil if (@comments_last_line || 0) &lt; tk.line_no - 2
+        if @statement.empty? &amp;&amp; (@comments_last_line || 0) &lt; tk.line_no - 2
+          @comments = nil 
+        end
         
         return unless tk.class == TkCOMMENT
         </diff>
      <filename>lib/yard/parser/ruby/legacy/statement_list.rb</filename>
    </modified>
    <modified>
      <diff>@@ -238,6 +238,18 @@ eof
       def method; end
     eof
     s.comments.should == nil
+
+    ss = stmts &lt;&lt;-eof
+      # comments
+      
+      
+      def method; end
+      
+      # hello
+      def method2; end
+    eof
+    ss[0].comments.should == nil
+    ss[1].comments.should == ['hello']
   end
   
   it &quot;should handle CRLF (Windows) newlines&quot; do</diff>
      <filename>spec/parser/ruby/legacy/statement_list_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b3800de9cfe318c9e06e13b9bad6df73123da8b4</id>
    </parent>
  </parents>
  <author>
    <name>Loren Segal</name>
    <email>lsegal@soen.ca</email>
  </author>
  <url>http://github.com/lsegal/yard/commit/0ee4cad07726e91cc995f76f40fe4317bd82ee18</url>
  <id>0ee4cad07726e91cc995f76f40fe4317bd82ee18</id>
  <committed-date>2009-11-06T19:24:13-08:00</committed-date>
  <authored-date>2009-11-06T19:24:13-08:00</authored-date>
  <message>Another fix for comments not registering as docstrings in 1.8 parser</message>
  <tree>414d5705efd818039e4d978d6c28065b57741ce5</tree>
  <committer>
    <name>Loren Segal</name>
    <email>lsegal@soen.ca</email>
  </committer>
</commit>
