summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-02 04:40:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-02 04:40:47 +0000
commit2553a96f9eb29ca334d713aa1830f5cce3045f86 (patch)
tree9dacfb2860480748b03d7b7561a52cb1a5da868e /lib
parent0c216c32dc9e5ce2554b516e821c4e94c2f05316 (diff)
* {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
Diffstat (limited to 'lib')
-rw-r--r--lib/rdoc.rb12
-rw-r--r--lib/rdoc/generator/template/darkfish/js/darkfish.js10
-rw-r--r--lib/rdoc/generator/template/darkfish/js/quicksearch.js14
-rw-r--r--lib/rdoc/generator/template/darkfish/rdoc.css4
-rw-r--r--lib/rdoc/markup.rb14
-rw-r--r--lib/rdoc/markup/to_html.rb2
-rw-r--r--lib/rdoc/parser.rb6
-rw-r--r--lib/rdoc/parser/c.rb2
-rw-r--r--lib/rdoc/parser/perl.rb16
-rw-r--r--lib/rdoc/parser/ruby.rb26
-rw-r--r--lib/rdoc/ri/driver.rb2
-rw-r--r--lib/rdoc/ruby_lex.rb24
-rw-r--r--lib/rdoc/ruby_token.rb8
13 files changed, 70 insertions, 70 deletions
diff --git a/lib/rdoc.rb b/lib/rdoc.rb
index fb83932d27..f0ca4e2350 100644
--- a/lib/rdoc.rb
+++ b/lib/rdoc.rb
@@ -88,7 +88,7 @@ $DEBUG_RDOC = nil
#
# =begin rdoc
# Documentation to be processed by RDoc.
-#
+#
# ...
# =end
#
@@ -104,7 +104,7 @@ $DEBUG_RDOC = nil
# # FIXME: fails if the birthday falls on February 29th
# #++
# # The DOB is returned as a Time object.
-#
+#
# def get_dob(person)
# # ...
# end
@@ -130,7 +130,7 @@ $DEBUG_RDOC = nil
#
# def fred # :yields: index, position
# # ...
-#
+#
# yield line, address
#
# which will get documented as
@@ -256,12 +256,12 @@ $DEBUG_RDOC = nil
# module also will be omitted. By default, though, modules and
# classes within that class of module _will_ be documented. This is
# turned off by adding the +all+ modifier.
-#
+#
# module MyModule # :nodoc:
# class Input
# end
# end
-#
+#
# module OtherModule # :nodoc: all
# class Output
# end
@@ -295,7 +295,7 @@ $DEBUG_RDOC = nil
# comment block may have one or more lines before the :section: directive.
# These will be removed, and any identical lines at the end of the block are
# also removed. This allows you to add visual cues such as:
-#
+#
# # ----------------------------------------
# # :section: My Section
# # This is the section that I wrote.
diff --git a/lib/rdoc/generator/template/darkfish/js/darkfish.js b/lib/rdoc/generator/template/darkfish/js/darkfish.js
index 43528fdde4..84565c1e2d 100644
--- a/lib/rdoc/generator/template/darkfish/js/darkfish.js
+++ b/lib/rdoc/generator/template/darkfish/js/darkfish.js
@@ -1,10 +1,10 @@
/**
- *
+ *
* Darkfish Page Functions
* $Id: darkfish.js 53 2009-01-07 02:52:03Z deveiant $
- *
+ *
* Author: Michael Granger <mgranger@laika.com>
- *
+ *
*/
/* Provide console simulation for firebug-less environments */
@@ -58,7 +58,7 @@ function hookQuickSearch() {
var toggle = $(this).parents('.section').find('h3 .search-toggle');
// console.debug( "Toggle is: %o", toggle );
var qsbox = $(this).parents('form').get( 0 );
-
+
$(this).quicksearch( this, searchElems, {
noSearchResultsIndicator: 'no-class-search-results',
focusOnLoad: false
@@ -87,7 +87,7 @@ function highlightTarget( anchor ) {
function highlightLocationTarget() {
console.debug( "Location hash: %s", window.location.hash );
if ( ! window.location.hash || window.location.hash.length == 0 ) return;
-
+
var anchor = window.location.hash.substring(1);
console.debug( "Found anchor: %s; matching %s", anchor, "a[name=" + anchor + "]" );
diff --git a/lib/rdoc/generator/template/darkfish/js/quicksearch.js b/lib/rdoc/generator/template/darkfish/js/quicksearch.js
index 332772ac71..70dbd33cd9 100644
--- a/lib/rdoc/generator/template/darkfish/js/quicksearch.js
+++ b/lib/rdoc/generator/template/darkfish/js/quicksearch.js
@@ -1,10 +1,10 @@
/**
- *
+ *
* JQuery QuickSearch - Hook up a form field to hide non-matching elements.
* $Id: quicksearch.js 53 2009-01-07 02:52:03Z deveiant $
- *
+ *
* Author: Michael Granger <mgranger@laika.com>
- *
+ *
*/
jQuery.fn.quicksearch = function( target, searchElems, options ) {
// console.debug( "Quicksearch fn" );
@@ -17,7 +17,7 @@ jQuery.fn.quicksearch = function( target, searchElems, options ) {
noSearchResultsIndicator: null
};
if ( options ) $.extend( settings, options );
-
+
return jQuery(this).each( function() {
// console.debug( "Creating a new quicksearch on %o for %o", this, searchElems );
new jQuery.quicksearch( this, searchElems, settings );
@@ -56,7 +56,7 @@ jQuery.quicksearch = function( searchBox, searchElems, settings ) {
case 8:
return true;
break;
-
+
// Only allow valid search characters
default:
return validQSChar( e.charCode );
@@ -88,7 +88,7 @@ jQuery.quicksearch = function( searchBox, searchElems, settings ) {
var searchText = searchBox.value;
var pat = new RegExp( searchText, "im" );
var shownCount = 0;
-
+
if ( settings.noSearchResultsIndicator ) {
$('#' + settings.noSearchResultsIndicator).hide();
}
@@ -96,7 +96,7 @@ jQuery.quicksearch = function( searchBox, searchElems, settings ) {
// All elements start out hidden
$(searchElems).each( function(index) {
var str = $(this).text();
-
+
if ( pat.test(str) ) {
shownCount += 1;
$(this).fadeIn();
diff --git a/lib/rdoc/generator/template/darkfish/rdoc.css b/lib/rdoc/generator/template/darkfish/rdoc.css
index e836c66339..2af2a1782f 100644
--- a/lib/rdoc/generator/template/darkfish/rdoc.css
+++ b/lib/rdoc/generator/template/darkfish/rdoc.css
@@ -1,9 +1,9 @@
/*
* "Darkfish" Rdoc CSS
* $Id: rdoc.css 54 2009-01-27 01:09:48Z deveiant $
- *
+ *
* Author: Michael Granger <ged@FaerieMUD.org>
- *
+ *
*/
/* Base Green is: #6C8C22 */
diff --git a/lib/rdoc/markup.rb b/lib/rdoc/markup.rb
index c3c5213943..8176e90447 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/to_html.rb b/lib/rdoc/markup/to_html.rb
index f060fd1c72..66c0ee3d30 100644
--- a/lib/rdoc/markup/to_html.rb
+++ b/lib/rdoc/markup/to_html.rb
@@ -290,7 +290,7 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter
# Determins the HTML list element for +list_type+ and +open_tag+
def html_list_name(list_type, open_tag)
- tags = LIST_TYPE_TO_HTML[list_type]
+ tags = LIST_TYPE_TO_HTML[list_type]
raise RDoc::Error, "Invalid list type: #{list_type.inspect}" unless tags
annotate tags[open_tag ? 0 : 1]
end
diff --git a/lib/rdoc/parser.rb b/lib/rdoc/parser.rb
index 9ad1fbdf66..e1b264bffa 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 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)
diff --git a/lib/rdoc/ri/driver.rb b/lib/rdoc/ri/driver.rb
index 1829de3432..d3620d4817 100644
--- a/lib/rdoc/ri/driver.rb
+++ b/lib/rdoc/ri/driver.rb
@@ -532,7 +532,7 @@ Options may also be set in the 'RI' environment variable.
elsif selector then
# replace Foo with Foo:: as given
completions.delete klass
- completions << "#{klass}#{selector}"
+ completions << "#{klass}#{selector}"
end
completions.push(*methods)
diff --git a/lib/rdoc/ruby_lex.rb b/lib/rdoc/ruby_lex.rb
index 014117fb17..eda7b81e1f 100644
--- a/lib/rdoc/ruby_lex.rb
+++ b/lib/rdoc/ruby_lex.rb
@@ -144,7 +144,7 @@ class RDoc::RubyLex
end
@seek += 1
if c == "\n"
- @line_no += 1
+ @line_no += 1
@char_no = 0
else
@char_no += 1
@@ -181,10 +181,10 @@ class RDoc::RubyLex
c2 = @here_readed.pop
end
c = c2 unless c
- @rests.unshift c #c =
+ @rests.unshift c #c =
@seek -= 1
if c == "\n"
- @line_no -= 1
+ @line_no -= 1
if idx = @readed.reverse.index("\n")
@char_no = @readed.size - idx
else
@@ -394,7 +394,7 @@ class RDoc::RubyLex
end
@OP.def_rule("=begin",
- proc{|op, io| @prev_char_no == 0 && peek(0) =~ /\s/}) do
+ proc{|op, io| @prev_char_no == 0 && peek(0) =~ /\s/}) do
|op, io|
@ltype = "="
res = ''
@@ -415,8 +415,8 @@ class RDoc::RubyLex
else
@continue = false
@lex_state = EXPR_BEG
- until (@indent_stack.empty? ||
- [TkLPAREN, TkLBRACK, TkLBRACE,
+ until (@indent_stack.empty? ||
+ [TkLPAREN, TkLBRACK, TkLBRACE,
TkfLPAREN, TkfLBRACK, TkfLBRACE].include?(@indent_stack.last))
@indent_stack.pop
end
@@ -427,7 +427,7 @@ class RDoc::RubyLex
end
@OP.def_rules("*", "**",
- "=", "==", "===",
+ "=", "==", "===",
"=~", "<=>",
"<", "<=",
">", ">=", ">>") do
@@ -641,8 +641,8 @@ class RDoc::RubyLex
@OP.def_rules(";") do
|op, io|
@lex_state = EXPR_BEG
- until (@indent_stack.empty? ||
- [TkLPAREN, TkLBRACK, TkLBRACE,
+ until (@indent_stack.empty? ||
+ [TkLPAREN, TkLBRACK, TkLBRACE,
TkfLPAREN, TkfLBRACK, TkfLBRACE].include?(@indent_stack.last))
@indent_stack.pop
end
@@ -761,7 +761,7 @@ class RDoc::RubyLex
end
end
- # @OP.def_rule("def", proc{|op, io| /\s/ =~ io.peek(0)}) do
+ # @OP.def_rule("def", proc{|op, io| /\s/ =~ io.peek(0)}) do
# |op, io|
# @indent += 1
# @lex_state = EXPR_FNAME
@@ -1149,7 +1149,7 @@ class RDoc::RubyLex
str << read_escape
end
- if PERCENT_PAREN.values.include?(@quoted)
+ if PERCENT_PAREN.values.include?(@quoted)
if PERCENT_PAREN[ch] == @quoted
nest += 1
elsif ch == @quoted
@@ -1270,7 +1270,7 @@ class RDoc::RubyLex
escape << ch << read_escape
end
else
- # other characters
+ # other characters
end
escape
diff --git a/lib/rdoc/ruby_token.rb b/lib/rdoc/ruby_token.rb
index 87fdc73b0a..0c4f837193 100644
--- a/lib/rdoc/ruby_token.rb
+++ b/lib/rdoc/ruby_token.rb
@@ -1,5 +1,5 @@
#--
-# irb/ruby-token.rb - ruby tokens
+# irb/ruby-token.rb - ruby tokens
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-12 15:01:19 -0800 (Mon, 12 Feb 2007) $
@@ -211,7 +211,7 @@ module RDoc::RubyToken
IRB.fail TkReading2TokenNoKey, token
end
- tk = Token(tk[0], value)
+ tk = Token(tk[0], value)
if tk.kind_of?(TkOp) then
tk.name = token
@@ -221,8 +221,8 @@ module RDoc::RubyToken
IRB.fail TkSymbol2TokenNoKey, token
end
- tk = Token(tk[0], value)
- else
+ tk = Token(tk[0], value)
+ else
if token.instance_method(:initialize).arity == 3 then
tk = token.new(@prev_seek, @prev_line_no, @prev_char_no)
tk.set_text value