From 2553a96f9eb29ca334d713aa1830f5cce3045f86 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 2 Apr 2010 04:40:47 +0000 Subject: * {lib,test}/rdoc: removed trailing spaces. reapplied r22784. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rdoc/parser/c.rb | 2 +- lib/rdoc/parser/perl.rb | 16 ++++++++-------- lib/rdoc/parser/ruby.rb | 26 +++++++++++++------------- 3 files changed, 22 insertions(+), 22 deletions(-) (limited to 'lib/rdoc/parser') diff --git a/lib/rdoc/parser/c.rb b/lib/rdoc/parser/c.rb index f2d460b62f..7682c69758 100644 --- a/lib/rdoc/parser/c.rb +++ b/lib/rdoc/parser/c.rb @@ -76,7 +76,7 @@ require 'rdoc/known_classes' # * Encapsulate the writing and reading of the configuration # * file. ... # */ -# +# # /* # * Document-method: read_value # * diff --git a/lib/rdoc/parser/perl.rb b/lib/rdoc/parser/perl.rb index 43d1e9ff69..0023a013a6 100644 --- a/lib/rdoc/parser/perl.rb +++ b/lib/rdoc/parser/perl.rb @@ -15,7 +15,7 @@ require 'rdoc/parser' # # We would like to support all the markup the POD provides # so that it will convert happily to HTML. At the moment -# I don't think I can do that: time constraints. +# I don't think I can do that: time constraints. # class RDoc::Parser::PerlPOD < RDoc::Parser @@ -45,39 +45,39 @@ class RDoc::Parser::PerlPOD < RDoc::Parser # but I think it would obscure the intent, scatter the # code all over tha place. This machine is necessary # because POD requires that directives be preceded by - # blank lines, so reading line by line is necessary, + # blank lines, so reading line by line is necessary, # and preserving state about what is seen is necesary. def scan @top_level.comment ||= "" - state=:code_blank + state=:code_blank line_number = 0 line = nil # This started out as a really long nested case statement, # which also led to repetitive code. I'd like to avoid that # so I'm using a "table" instead. - + # Firstly we need some procs to do the transition and processing # work. Because these are procs they are closures, and they can # use variables in the local scope. # # First, the "nothing to see here" stuff. - code_noop = lambda do + code_noop = lambda do if line =~ /^\s+$/ state = :code_blank end end - pod_noop = lambda do + pod_noop = lambda do if line =~ /^\s+$/ state = :pod_blank end @top_level.comment += filter(line) end - begin_noop = lambda do + begin_noop = lambda do if line =~ /^\s+$/ state = :begin_blank end @@ -151,7 +151,7 @@ class RDoc::Parser::PerlPOD < RDoc::Parser def filter(comment) return '' if comment =~ /^=pod\s*$/ comment.gsub!(/^=pod/, '==') - comment.gsub!(/^=head(\d+)/) do + comment.gsub!(/^=head(\d+)/) do "=" * $1.to_i end comment.gsub!(/=item/, ''); diff --git a/lib/rdoc/parser/ruby.rb b/lib/rdoc/parser/ruby.rb index f78dcf07d6..8072293b09 100644 --- a/lib/rdoc/parser/ruby.rb +++ b/lib/rdoc/parser/ruby.rb @@ -50,7 +50,7 @@ $TOKEN_DEBUG ||= nil # # ## # # This method tries over and over until it is tired -# +# # def go_go_go(thing_to_try, tries = 10) # :args: thing_to_try # puts thing_to_try # go_go_go thing_to_try, tries - 1 @@ -70,7 +70,7 @@ $TOKEN_DEBUG ||= nil # # :call-seq: # # my_method(Range) # # my_method(offset, length) -# +# # def my_method(*args) # end # @@ -81,7 +81,7 @@ $TOKEN_DEBUG ||= nil # # ## # # My method is awesome -# +# # def my_method(&block) # :yields: happy, times # block.call 1, 2 # end @@ -93,7 +93,7 @@ $TOKEN_DEBUG ||= nil # # ## # # This is a meta-programmed method! -# +# # add_my_method :meta_method, :arg1, :arg2 # # The parser looks at the token after the identifier to determine the name, in @@ -131,14 +131,14 @@ $TOKEN_DEBUG ||= nil # ## # # :attr_writer: ghost_writer # # There is an attribute here, but you can't see it! -# +# # ## # # :method: ghost_method # # There is a method here, but you can't see it! -# +# # ## # # this is a comment for a regular method -# +# # def regular_method() end # # Note that by default, the :method: directive will be ignored if there is a @@ -737,27 +737,27 @@ class RDoc::Parser::Ruby < RDoc::Parser # To create foo and bar attributes on class C with comment "My attributes": # # class C - # + # # ## # # :attr: # # # # My attributes - # + # # my_attr :foo, :bar - # + # # end # # To create a foo attribute on class C with comment "My attribute": # # class C - # + # # ## # # :attr: foo # # # # My attribute - # + # # my_attr :foo, :bar - # + # # end def parse_meta_attr(context, single, tk, comment) -- cgit v1.2.3