summaryrefslogtreecommitdiff
path: root/lib/rdoc
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-06 03:56:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-06 03:56:38 +0000
commit287a34ae0dfc23e4158f67cb7783d239f202c368 (patch)
tree5e35d5b41aae961b37cf6632f60c42f51c7aa775 /lib/rdoc
parent9b52ae2e6491bb5d6c59e1799449f6268baf6f89 (diff)
* {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc')
-rw-r--r--lib/rdoc/code_objects.rb8
-rw-r--r--lib/rdoc/diagram.rb2
-rw-r--r--lib/rdoc/generator.rb2
-rw-r--r--lib/rdoc/generator/chm/chm.rb2
-rw-r--r--lib/rdoc/generator/html.rb6
-rw-r--r--lib/rdoc/generator/html/hefss.rb4
-rw-r--r--lib/rdoc/generator/html/html.rb2
-rw-r--r--lib/rdoc/generator/html/kilmer.rb4
-rw-r--r--lib/rdoc/generator/html/kilmerfactory.rb8
-rw-r--r--lib/rdoc/generator/html/one_page_html.rb2
-rw-r--r--lib/rdoc/generator/texinfo.rb2
-rw-r--r--lib/rdoc/markup.rb14
-rw-r--r--lib/rdoc/markup/fragments.rb2
-rw-r--r--lib/rdoc/markup/to_html.rb2
-rw-r--r--lib/rdoc/markup/to_html_crossref.rb2
-rw-r--r--lib/rdoc/options.rb2
-rw-r--r--lib/rdoc/parser.rb6
-rw-r--r--lib/rdoc/parser/c.rb4
-rw-r--r--lib/rdoc/parser/f95.rb100
-rw-r--r--lib/rdoc/parser/perl.rb16
-rw-r--r--lib/rdoc/parser/ruby.rb12
-rw-r--r--lib/rdoc/ri/display.rb30
-rw-r--r--lib/rdoc/ri/driver.rb2
-rw-r--r--lib/rdoc/ri/formatter.rb2
-rw-r--r--lib/rdoc/ri/util.rb2
25 files changed, 119 insertions, 119 deletions
diff --git a/lib/rdoc/code_objects.rb b/lib/rdoc/code_objects.rb
index 0916b03398..3fdd86314d 100644
--- a/lib/rdoc/code_objects.rb
+++ b/lib/rdoc/code_objects.rb
@@ -340,7 +340,7 @@ module RDoc
meth.add_alias(new_meth)
add_method(new_meth)
end
-
+
def add_alias(an_alias)
meth = find_instance_method_named(an_alias.old_name)
@@ -453,7 +453,7 @@ module RDoc
@method_list.each {|m| yield m}
end
- def each_attribute
+ def each_attribute
@attributes.each {|a| yield a}
end
@@ -658,7 +658,7 @@ module RDoc
def self.find_class_named(name)
@@all_classes.each_value do |c|
- res = c.find_class_named(name)
+ res = c.find_class_named(name)
return res if res
end
nil
@@ -767,7 +767,7 @@ module RDoc
raise NoMethodError, "#{full_name} is a module" if module?
if @superclass.nil? or @superclass == 'Object' then
- @superclass = superclass
+ @superclass = superclass
end
end
diff --git a/lib/rdoc/diagram.rb b/lib/rdoc/diagram.rb
index 4aa2ec5656..d308d36dee 100644
--- a/lib/rdoc/diagram.rb
+++ b/lib/rdoc/diagram.rb
@@ -313,7 +313,7 @@ module RDoc
def wrap_in_image_map(src, dot)
res = ""
dot_map = `dot -Tismap #{src}`
-
+
if(!dot_map.empty?)
res << %{<map id="map" name="map">\n}
dot_map.split($/).each do |area|
diff --git a/lib/rdoc/generator.rb b/lib/rdoc/generator.rb
index d695e661d1..86196b4cf6 100644
--- a/lib/rdoc/generator.rb
+++ b/lib/rdoc/generator.rb
@@ -137,7 +137,7 @@ module RDoc::Generator
end
RDoc::TopLevel.all_classes_and_modules.each do |cls|
- build_class_list(classes, options, cls, files[0],
+ build_class_list(classes, options, cls, files[0],
RDoc::Generator::CLASS_DIR)
end
diff --git a/lib/rdoc/generator/chm/chm.rb b/lib/rdoc/generator/chm/chm.rb
index cceeca5dfc..c362318d91 100644
--- a/lib/rdoc/generator/chm/chm.rb
+++ b/lib/rdoc/generator/chm/chm.rb
@@ -6,7 +6,7 @@ module RDoc::Generator::CHM::CHM
HTML = RDoc::Generator::HTML::HTML
INDEX = HTML::INDEX
-
+
STYLE = HTML::STYLE
CLASS_INDEX = HTML::CLASS_INDEX
diff --git a/lib/rdoc/generator/html.rb b/lib/rdoc/generator/html.rb
index d136de7b00..60e0c175fe 100644
--- a/lib/rdoc/generator/html.rb
+++ b/lib/rdoc/generator/html.rb
@@ -305,9 +305,9 @@ class RDoc::Generator::HTML
open 'index.html', 'w' do |f|
style_url = style_url '', @options.css
-
+
classes = @classes.sort.map { |klass| klass.value_hash }
-
+
values = {
'initial_page' => @main_url,
'style_url' => style_url('', @options.css),
@@ -315,7 +315,7 @@ class RDoc::Generator::HTML
'charset' => @options.charset,
'classes' => classes,
}
-
+
values['inline_source'] = @options.inline_source
main.write_html_on f, values
diff --git a/lib/rdoc/generator/html/hefss.rb b/lib/rdoc/generator/html/hefss.rb
index 540c23d869..01425a4556 100644
--- a/lib/rdoc/generator/html/hefss.rb
+++ b/lib/rdoc/generator/html/hefss.rb
@@ -125,9 +125,9 @@ EOF
STYLE = FACTORY.get_STYLE()
METHOD_LIST = FACTORY.get_METHOD_LIST()
-
+
BODY = FACTORY.get_BODY()
-
+
FILE_PAGE = FACTORY.get_FILE_PAGE()
CLASS_PAGE = FACTORY.get_CLASS_PAGE()
diff --git a/lib/rdoc/generator/html/html.rb b/lib/rdoc/generator/html/html.rb
index 823d8056e7..5e5b4d5531 100644
--- a/lib/rdoc/generator/html/html.rb
+++ b/lib/rdoc/generator/html/html.rb
@@ -11,7 +11,7 @@ require 'rdoc/generator/html/common'
# '[source]' link.
#
# This template *also* forms the basis of the frameless template.
-#
+#
# == Authors
#
# * Michael Granger <ged@FaerieMUD.org>
diff --git a/lib/rdoc/generator/html/kilmer.rb b/lib/rdoc/generator/html/kilmer.rb
index 4c5a9ee8b0..233a9259a2 100644
--- a/lib/rdoc/generator/html/kilmer.rb
+++ b/lib/rdoc/generator/html/kilmer.rb
@@ -126,9 +126,9 @@ EOF
STYLE = FACTORY.get_STYLE()
METHOD_LIST = FACTORY.get_METHOD_LIST()
-
+
BODY = FACTORY.get_BODY()
-
+
FILE_PAGE = FACTORY.get_FILE_PAGE()
CLASS_PAGE = FACTORY.get_CLASS_PAGE()
diff --git a/lib/rdoc/generator/html/kilmerfactory.rb b/lib/rdoc/generator/html/kilmerfactory.rb
index ef6f3f3b4d..1407840839 100644
--- a/lib/rdoc/generator/html/kilmerfactory.rb
+++ b/lib/rdoc/generator/html/kilmerfactory.rb
@@ -61,8 +61,8 @@ class RDoc::Generator::HTML::KilmerFactory
# If not supplied, this defaults to "Attributes".
#
attr_reader :attribute_list_heading
-
- #
+
+ #
# ====Description:
# This method constructs a KilmerFactory instance, which
# can be used to build Kilmer-style template classes.
@@ -72,7 +72,7 @@ class RDoc::Generator::HTML::KilmerFactory
# ====Parameters:
# [style_attributes]
# A Hash describing the appearance of the Kilmer-style.
- #
+ #
def initialize(style_attributes)
@central_css = style_attributes[:central_css]
if(!@central_css)
@@ -103,7 +103,7 @@ class RDoc::Generator::HTML::KilmerFactory
def get_STYLE
return @central_css
end
-
+
def get_METHOD_LIST
return %{
<% if values["diagram"] then %>
diff --git a/lib/rdoc/generator/html/one_page_html.rb b/lib/rdoc/generator/html/one_page_html.rb
index 51ae32351a..5bae2f34f7 100644
--- a/lib/rdoc/generator/html/one_page_html.rb
+++ b/lib/rdoc/generator/html/one_page_html.rb
@@ -54,7 +54,7 @@ module RDoc::Generator::HTML::ONE_PAGE_HTML
<% sections["method_list"].each do |method_list| %>
<% if method_list["methods"] then %>
<% method_list["methods"].each do |methods| %>
-<h4><%= methods["type"] %> <%= methods["category"] %> method:
+<h4><%= methods["type"] %> <%= methods["category"] %> method:
<% if methods["callseq"] then %>
<a name="<%= methods["aref"] %>"><%= methods["callseq"] %></a>
<% end %>
diff --git a/lib/rdoc/generator/texinfo.rb b/lib/rdoc/generator/texinfo.rb
index 70db875af9..99a1452f21 100644
--- a/lib/rdoc/generator/texinfo.rb
+++ b/lib/rdoc/generator/texinfo.rb
@@ -51,7 +51,7 @@ module RDoc
def initialize(values, file = 'texinfo.erb')
@v, @file = [values, file]
end
-
+
def template
::File.read(::File.join(BASE_DIR, 'texinfo', @file))
end
diff --git a/lib/rdoc/markup.rb b/lib/rdoc/markup.rb
index 9d22b38946..a584a79b75 100644
--- a/lib/rdoc/markup.rb
+++ b/lib/rdoc/markup.rb
@@ -27,9 +27,9 @@ require 'rdoc'
# convert multiple input strings.
#
# require 'rdoc/markup/to_html'
-#
+#
# h = RDoc::Markup::ToHtml.new
-#
+#
# puts h.convert(input_string)
#
# You can extend the RDoc::Markup parser to recognise new markup
@@ -41,22 +41,22 @@ require 'rdoc'
#
# require 'rdoc/markup'
# require 'rdoc/markup/to_html'
-#
+#
# class WikiHtml < RDoc::Markup::ToHtml
# def handle_special_WIKIWORD(special)
# "<font color=red>" + special.text + "</font>"
# end
# end
-#
+#
# m = RDoc::Markup.new
# m.add_word_pair("{", "}", :STRIKE)
# m.add_html("no", :STRIKE)
-#
+#
# m.add_special(/\b([A-Z][a-z]+[A-Z]\w+)/, :WIKIWORD)
-#
+#
# wh = WikiHtml.new
# wh.add_tag(:STRIKE, "<strike>", "</strike>")
-#
+#
# puts "<body>#{wh.convert ARGF.read}</body>"
#
#--
diff --git a/lib/rdoc/markup/fragments.rb b/lib/rdoc/markup/fragments.rb
index b7f9b605c8..0031b809b4 100644
--- a/lib/rdoc/markup/fragments.rb
+++ b/lib/rdoc/markup/fragments.rb
@@ -203,7 +203,7 @@ class RDoc::Markup
# normal paragraph text.
#
# this is code
- #
+ #
# and more code
#
# You'll end up with the fragments Paragraph, BlankLine, Verbatim,
diff --git a/lib/rdoc/markup/to_html.rb b/lib/rdoc/markup/to_html.rb
index dce7a69b12..0165042d84 100644
--- a/lib/rdoc/markup/to_html.rb
+++ b/lib/rdoc/markup/to_html.rb
@@ -309,7 +309,7 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter
# convert -- to em-dash, (-- to en-dash)
gsub(/---?/, '&#8212;'). #gsub(/--/, '&#8211;').
-
+
# convert ... to elipsis (and make sure .... becomes .<elipsis>)
gsub(/\.\.\.\./, '.&#8230;').gsub(/\.\.\./, '&#8230;').
diff --git a/lib/rdoc/markup/to_html_crossref.rb b/lib/rdoc/markup/to_html_crossref.rb
index dc64b30da1..e73fbf5c8f 100644
--- a/lib/rdoc/markup/to_html_crossref.rb
+++ b/lib/rdoc/markup/to_html_crossref.rb
@@ -10,7 +10,7 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml
attr_accessor :context
# Regular expressions to match class and method references.
- #
+ #
# 1.) There can be a '\' in front of text to suppress
# any cross-references (note, however, that the single '\'
# is written as '\\\\' in order to escape it twice, once
diff --git a/lib/rdoc/options.rb b/lib/rdoc/options.rb
index 1d92bd4748..2b069f4265 100644
--- a/lib/rdoc/options.rb
+++ b/lib/rdoc/options.rb
@@ -65,7 +65,7 @@ class RDoc::Options
# Formatter to mark up text with
attr_accessor :formatter
-
+
##
# image format for diagrams
diff --git a/lib/rdoc/parser.rb b/lib/rdoc/parser.rb
index 6b1233c62d..275d3cc8f9 100644
--- a/lib/rdoc/parser.rb
+++ b/lib/rdoc/parser.rb
@@ -22,14 +22,14 @@ require 'rdoc/stats'
# following incantation
#
# require "rdoc/parser"
-#
+#
# class RDoc::Parser::Xyz < RDoc::Parser
# parse_files_matching /\.xyz$/ # <<<<
-#
+#
# def initialize(file_name, body, options)
# ...
# end
-#
+#
# def scan
# ...
# end
diff --git a/lib/rdoc/parser/c.rb b/lib/rdoc/parser/c.rb
index 933838debd..c3fb5e5b19 100644
--- a/lib/rdoc/parser/c.rb
+++ b/lib/rdoc/parser/c.rb
@@ -79,7 +79,7 @@ require 'rdoc/known_classes'
# * Encapsulate the writing and reading of the configuration
# * file. ...
# */
-#
+#
# /*
# * Document-method: read_value
# *
@@ -124,7 +124,7 @@ class RDoc::Parser::C < RDoc::Parser
end
def do_classes
- @content.scan(/(\w+)\s* = \s*rb_define_module\s*\(\s*"(\w+)"\s*\)/mx) do
+ @content.scan(/(\w+)\s* = \s*rb_define_module\s*\(\s*"(\w+)"\s*\)/mx) do
|var_name, class_name|
handle_class_module(var_name, "module", class_name, nil, nil)
end
diff --git a/lib/rdoc/parser/f95.rb b/lib/rdoc/parser/f95.rb
index fd372b098b..0959db4936 100644
--- a/lib/rdoc/parser/f95.rb
+++ b/lib/rdoc/parser/f95.rb
@@ -79,17 +79,17 @@ require 'rdoc/parser'
# !
# ! Comment blocks for the modules (or the programs).
# !
-#
+#
# private
-#
+#
# logical :: a ! a private variable
# real, public :: b ! a public variable
# integer, parameter :: c = 0 ! a public constant
-#
+#
# public :: c
# public :: MULTI_ARRAY
# public :: hoge, foo
-#
+#
# type MULTI_ARRAY
# !
# ! Comment blocks for the derived-types.
@@ -97,9 +97,9 @@ require 'rdoc/parser'
# real, pointer :: var(:) =>null() ! Comments block for the variables.
# integer :: num = 0
# end type MULTI_ARRAY
-#
+#
# contains
-#
+#
# subroutine hoge( in, & ! Comment blocks between continuation lines are ignored.
# & out )
# !
@@ -109,32 +109,32 @@ require 'rdoc/parser'
# character(*),intent(out),allocatable,target :: in
# ! Comment blocks can be
# ! written under Fortran statements.
-#
+#
# character(32) :: file ! This comment parsed as a variable in below NAMELIST.
# integer :: id
-#
+#
# namelist /varinfo_nml/ file, id
# !
# ! Comment blocks for the NAMELISTs.
# ! Information about variables are described above.
# !
-#
+#
# ....
-#
+#
# end subroutine hoge
-#
+#
# integer function foo( in )
# !
# ! This part is considered as comment block.
-#
+#
# ! Comment blocks under blank lines are ignored.
# !
# integer, intent(in):: inA ! This part is considered as comment block.
-#
+#
# ! This part is ignored.
-#
+#
# end function foo
-#
+#
# subroutine hide( in, &
# & out ) !:nodoc:
# !
@@ -145,11 +145,11 @@ require 'rdoc/parser'
# ! defined operators, defined assignments,
# ! list of imported modules ("use" statement).
# !
-#
+#
# ....
-#
+#
# end subroutine hide
-#
+#
# end module hogehoge
class RDoc::Parser::F95 < RDoc::Parser
@@ -295,7 +295,7 @@ class RDoc::Parser::F95 < RDoc::Parser
@stats.add_module f9x_module
- f9x_comment = COMMENTS_ARE_UPPER ?
+ f9x_comment = COMMENTS_ARE_UPPER ?
find_comments(pre_comment.join("\n")) + "\n" + module_trailing :
module_trailing + "\n" + find_comments(module_code.sub(/^.*$\n/i, ''))
f9x_module.comment = f9x_comment
@@ -320,8 +320,8 @@ class RDoc::Parser::F95 < RDoc::Parser
program_code = module_program_code
program_trailing = module_program_trailing
# progress "p" # HACK what stats thingy does this correspond to?
- program_comment = COMMENTS_ARE_UPPER ?
- find_comments(pre_comment.join("\n")) + "\n" + program_trailing :
+ program_comment = COMMENTS_ARE_UPPER ?
+ find_comments(pre_comment.join("\n")) + "\n" + program_trailing :
program_trailing + "\n" + find_comments(program_code.sub(/^.*$\n/i, ''))
program_comment = "\n\n= <i>Program</i> <tt>#{program_name}</tt>\n\n" \
+ program_comment
@@ -410,12 +410,12 @@ class RDoc::Parser::F95 < RDoc::Parser
# This information is used when "add_method" and
# "set_visibility_for" are called.
#
- visibility_default, visibility_info =
+ visibility_default, visibility_info =
parse_visibility(remaining_lines.join("\n"), visibility, container)
@@public_methods.concat visibility_info
if visibility_default == :public
if !cascaded_modules_list.empty?
- cascaded_modules =
+ cascaded_modules =
Attr.new("Cascaded Modules",
"Imported modules all of whose components are published again",
"",
@@ -499,7 +499,7 @@ class RDoc::Parser::F95 < RDoc::Parser
type_trailing = find_comments($4)
next if type_trailing =~ /^:nodoc:/
type_visibility = $1
- type_comment = COMMENTS_ARE_UPPER ?
+ type_comment = COMMENTS_ARE_UPPER ?
find_comments($~.pre_match) + "\n" + type_trailing :
type_trailing + "\n" + find_comments(type_code.sub(/^.*$\n/i, ''))
type_element_visibility_public = true
@@ -567,8 +567,8 @@ class RDoc::Parser::F95 < RDoc::Parser
end
if !derived_types_comment.empty?
- derived_types_table =
- Attr.new("Derived Types", "Derived_Types", "",
+ derived_types_table =
+ Attr.new("Derived Types", "Derived_Types", "",
derived_types_comment)
container.add_attribute(derived_types_table)
end
@@ -733,8 +733,8 @@ class RDoc::Parser::F95 < RDoc::Parser
subroutine_trailing = procedure_trailing
subroutine_code = procedure_code
- subroutine_comment = COMMENTS_ARE_UPPER ?
- pre_comment.join("\n") + "\n" + subroutine_trailing :
+ subroutine_comment = COMMENTS_ARE_UPPER ?
+ pre_comment.join("\n") + "\n" + subroutine_trailing :
subroutine_trailing + "\n" + subroutine_code.sub(/^.*$\n/i, '')
subroutine = AnyMethod.new("subroutine", subroutine_name)
parse_subprogram(subroutine, subroutine_params,
@@ -787,7 +787,7 @@ class RDoc::Parser::F95 < RDoc::Parser
# The visibility of procedure is specified
#
- set_visibility(container, procedure_name,
+ set_visibility(container, procedure_name,
visibility_default, @@public_methods)
# The alias for this procedure from external modules
@@ -871,11 +871,11 @@ class RDoc::Parser::F95 < RDoc::Parser
next if !old_meth
nolink = old_meth.visibility == :private ? true : nil
nolink = nil if @options.show_all
- new_meth =
- initialize_external_method(generic_name, proc,
- old_meth.params, nil,
- old_meth.comment,
- old_meth.clone.token_stream[0].text,
+ new_meth =
+ initialize_external_method(generic_name, proc,
+ old_meth.params, nil,
+ old_meth.comment,
+ old_meth.clone.token_stream[0].text,
true, nolink)
new_meth.singleton = old_meth.singleton
@@ -937,10 +937,10 @@ class RDoc::Parser::F95 < RDoc::Parser
end
if indicated_method
- external_method =
- initialize_external_method(generic_name, proc,
- indicated_method.params,
- indicated_file,
+ external_method =
+ initialize_external_method(generic_name, proc,
+ indicated_method.params,
+ indicated_file,
indicated_method.comment)
@stats.add_method external_method
@@ -1004,12 +1004,12 @@ class RDoc::Parser::F95 < RDoc::Parser
# Parse arguments, comment, code of subroutine and function. Return
# AnyMethod object.
- def parse_subprogram(subprogram, params, comment, code,
+ def parse_subprogram(subprogram, params, comment, code,
before_contains=nil, function=nil, prefix=nil)
subprogram.singleton = false
prefix = "" if !prefix
arguments = params.sub(/\(/, "").sub(/\)/, "").split(",") if params
- args_comment, params_opt =
+ args_comment, params_opt =
find_arguments(arguments, code.sub(/^s*?contains\s*?(!.*?)?$.*/im, ""),
nil, nil, true)
params_opt = "( " + params_opt + " ) " if params_opt
@@ -1086,7 +1086,7 @@ class RDoc::Parser::F95 < RDoc::Parser
if arg == defitem.varname.strip.chomp || all
args_rdocforms << <<-"EOF"
-#{indent}<tt><b>#{defitem.varname.chomp.strip}#{defitem.arraysuffix}</b> #{defitem.inivalue}</tt> ::
+#{indent}<tt><b>#{defitem.varname.chomp.strip}#{defitem.arraysuffix}</b> #{defitem.inivalue}</tt> ::
#{indent} <tt>#{defitem.types.chomp.strip}</tt>
EOF
if !defitem.comment.chomp.strip.empty?
@@ -1096,7 +1096,7 @@ EOF
}
args_rdocforms << <<-"EOF"
-#{indent} <tt></tt> ::
+#{indent} <tt></tt> ::
#{indent} <tt></tt>
#{indent} #{comment.chomp.strip}
EOF
@@ -1130,7 +1130,7 @@ EOF
before_contains = "" if !before_contains
while lines =~ /^\s*?namelist\s+\/\s*?(\w+)\s*?\/([\s\w\,]+)$/i
lines = $~.post_match
- nml_comment = COMMENTS_ARE_UPPER ?
+ nml_comment = COMMENTS_ARE_UPPER ?
find_comments($~.pre_match) : find_comments($~.post_match)
nml_name = $1
nml_args = $2.split(",")
@@ -1193,7 +1193,7 @@ EOF
if internal
external_alias_header = "#{INTERNAL_ALIAS_MES} "
- external_alias_text = external_alias_header + old
+ external_alias_text = external_alias_header + old
elsif file
external_alias_header = "#{EXTERNAL_ALIAS_MES} "
external_alias_text = external_alias_header + file + "#" + old
@@ -1325,8 +1325,8 @@ EOF
subname.upcase == alias_item["old_name"].upcase &&
@options.ignore_case
- new_meth = initialize_external_method(alias_item["new_name"],
- subname, params, @file_name,
+ new_meth = initialize_external_method(alias_item["new_name"],
+ subname, params, @file_name,
comment)
new_meth.visibility = alias_item["visibility"]
@@ -1402,7 +1402,7 @@ EOF
brank_flag = false
now_continuing = false
next ""
- else
+ else
brank_flag = false
now_continuing = false
ignore = false
@@ -1595,7 +1595,7 @@ EOF
comment_block = Array.new
checked = false
lines.each do |line|
- if !checked
+ if !checked
if /^\s?#{INTERNAL_ALIAS_MES}/ =~ line ||
/^\s?#{EXTERNAL_ALIAS_MES}/ =~ line
checked = true
@@ -1676,9 +1676,9 @@ EOF
def to_s
return <<-EOF
-<Fortran95Definition:
+<Fortran95Definition:
varname=#{@varname}, types=#{types},
-inivalue=#{@inivalue}, arraysuffix=#{@arraysuffix}, nodoc=#{@nodoc},
+inivalue=#{@inivalue}, arraysuffix=#{@arraysuffix}, nodoc=#{@nodoc},
comment=
#{@comment}
>
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 865cb79d39..cf6c1ad221 100644
--- a/lib/rdoc/parser/ruby.rb
+++ b/lib/rdoc/parser/ruby.rb
@@ -1373,7 +1373,7 @@ end
#
# ##
# # 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
@@ -1393,7 +1393,7 @@ end
# # :call-seq:
# # my_method(Range)
# # my_method(offset, length)
-#
+#
# def my_method(*args)
# end
#
@@ -1404,7 +1404,7 @@ end
#
# ##
# # My method is awesome
-#
+#
# def my_method(&block) # :yields: happy, times
# block.call 1, 2
# end
@@ -1416,7 +1416,7 @@ end
#
# ##
# # 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
@@ -1447,10 +1447,10 @@ end
# ##
# # :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
diff --git a/lib/rdoc/ri/display.rb b/lib/rdoc/ri/display.rb
index 7b0158c18a..f6b647fbc1 100644
--- a/lib/rdoc/ri/display.rb
+++ b/lib/rdoc/ri/display.rb
@@ -119,35 +119,35 @@ class RDoc::RI::DefaultDisplay
return display_class_method_list(klass)
end
end
-
+
##
# Given a Hash mapping a class' methods to method types (returned by
# display_class_method_list), this method allows the user to
# choose one of the methods.
-
+
def get_class_method_choice(method_map)
if CAN_USE_READLINE
# prepare abbreviations for tab completion
abbreviations = method_map.keys.abbrev
- Readline.completion_proc = proc do |string|
+ Readline.completion_proc = proc do |string|
abbreviations.values.uniq.grep(/^#{string}/)
end
end
-
+
@formatter.raw_print_line "\nEnter the method name you want.\n"
@formatter.raw_print_line "Class methods can be preceeded by '::' and instance methods by '#'.\n"
if CAN_USE_READLINE
@formatter.raw_print_line "You can use tab to autocomplete.\n"
@formatter.raw_print_line "Enter a blank line to exit.\n"
-
+
choice_string = Readline.readline(">> ").strip
else
@formatter.raw_print_line "Enter a blank line to exit.\n"
@formatter.raw_print_line ">> "
choice_string = $stdin.gets.strip
end
-
+
if choice_string == ''
return nil
else
@@ -172,7 +172,7 @@ class RDoc::RI::DefaultDisplay
end
end
end
-
+
##
# Display methods on +klass+
@@ -187,16 +187,16 @@ class RDoc::RI::DefaultDisplay
:instance_methods,
:instance_method_extensions,
]
-
+
class_data.each do |data_type|
data = klass.send data_type
-
+
unless data.nil? or data.empty? then
@formatter.blankline
-
+
heading = data_type.to_s.split('_').join(' ').capitalize << ':'
@formatter.display_heading heading, 2, ''
-
+
method_names = []
data.each do |item|
method_names << item.name
@@ -268,7 +268,7 @@ class RDoc::RI::DefaultDisplay
end
end
end
-
+
##
# Display a list of +methods+ and allow the user to select one of them.
@@ -280,9 +280,9 @@ class RDoc::RI::DefaultDisplay
methods.each_with_index do |method, index|
@formatter.raw_print_line "%3d %s [%s]\n" % [index + 1, method.full_name, method.source_path]
end
-
+
@formatter.raw_print_line ">> "
-
+
choice = $stdin.gets.strip!
if(choice == '')
@@ -294,7 +294,7 @@ class RDoc::RI::DefaultDisplay
if ((choice == 0) || (choice > methods.size)) then
@formatter.raw_print_line "Invalid choice!\n"
else
- method = methods[choice - 1]
+ method = methods[choice - 1]
display_method_info(method)
end
end
diff --git a/lib/rdoc/ri/driver.rb b/lib/rdoc/ri/driver.rb
index 0c91232b70..89534a5972 100644
--- a/lib/rdoc/ri/driver.rb
+++ b/lib/rdoc/ri/driver.rb
@@ -527,7 +527,7 @@ Options may also be set in the 'RI' environment variable.
ancestors = [orig_klass]
ancestors.push(*cache.includes.map { |inc| inc['name'] })
ancestors << cache.superclass
-
+
ancestor_index = ancestors.index(klass)
if ancestor_index
diff --git a/lib/rdoc/ri/formatter.rb b/lib/rdoc/ri/formatter.rb
index 933882abc4..258907d141 100644
--- a/lib/rdoc/ri/formatter.rb
+++ b/lib/rdoc/ri/formatter.rb
@@ -114,7 +114,7 @@ class RDoc::RI::Formatter
txt = txt.gsub(%r{<tt>(.*?)</tt>}, '+\1+')
txt.gsub!(%r{<code>(.*?)</code>}, '+\1+')
txt.gsub!(%r{<b>(.*?)</b>}, '*\1*')
- txt.gsub!(%r{<em>(.*?)</em>}, '_\1_')
+ txt.gsub!(%r{<em>(.*?)</em>}, '_\1_')
txt
end
diff --git a/lib/rdoc/ri/util.rb b/lib/rdoc/ri/util.rb
index 4e91eb978d..51cf881bdd 100644
--- a/lib/rdoc/ri/util.rb
+++ b/lib/rdoc/ri/util.rb
@@ -60,7 +60,7 @@ class RDoc::RI::NameDescriptor
end
if @method_name =~ /::|\.|#/ or !tokens.empty?
- raise RDoc::RI::Error.new("Bad argument: #{arg}")
+ raise RDoc::RI::Error.new("Bad argument: #{arg}")
end
if separator && separator != '.'
@is_class_method = separator == "::"