Fix typos (Doug Kearns)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
dave 2004-02-19 03:23:51 +00:00
parent 86dcdabac8
commit 23d081b993
4 changed files with 34 additions and 3 deletions

View File

@ -1,3 +1,8 @@
Thu Feb 19 02:34:28 2004 Dave Thomas <dave@pragprog.com>
* lib/rdoc/markup/simple_markup/preprocess.rb (SM::PreProcess::include_file):
Only strip comment markers if all lines start with comments.
Thu Feb 19 03:05:49 2004 Minero Aoki <aamine@loveruby.net> Thu Feb 19 03:05:49 2004 Minero Aoki <aamine@loveruby.net>
* ext/strscan/strscan.c: StringScanner#restsize is obsolete; * ext/strscan/strscan.c: StringScanner#restsize is obsolete;

View File

@ -45,7 +45,12 @@ module SM
def include_file(name, indent) def include_file(name, indent)
if (full_name = find_include_file(name)) if (full_name = find_include_file(name))
content = File.open(full_name) {|f| f.read} content = File.open(full_name) {|f| f.read}
res = content.gsub(/^#?/, indent) # strip leading '#'s, but only if all lines start with them
if content =~ /^[^#]/
content.gsub(/^/, indent)
else
content.gsub(/^#?/, indent)
end
else else
$stderr.puts "Couldn't find file to include: '#{name}'" $stderr.puts "Couldn't find file to include: '#{name}'"
'' ''

View File

@ -44,6 +44,27 @@
# #
# C classes can be diagramed (see /tc/dl/ruby/ruby/error.c), and RDoc # C classes can be diagramed (see /tc/dl/ruby/ruby/error.c), and RDoc
# integrates C and Ruby source into one tree # integrates C and Ruby source into one tree
#
# The comment blocks may include special direcives:
#
# [Document-class: <i>name</i>]
# This comment block is documentation for the given class. Use this
# when the <tt>Init_xxx</tt> method is not named after the class.
#
# [Document-method: <i>name</i>]
# This comment documents the named method. Use when RDoc cannot outomatically
# find the method from it's declaration
#
# [call-seq: <i>text up to an empty line</i>]
# Because C source doesn't give descripive names to Ruby-level parameters,
# you need to document the calling sequence explicitly
#
# In additon, RDoc assumes by default that the C method implementing a
# Ruby function is in the same source file as the rb_define_method call.
# If this isn't the case, add the comment
#
# rb_define_method(....); // in: filename
#
# Classes and modules built in to the interpreter. We need # Classes and modules built in to the interpreter. We need
# these to define superclasses of user objects # these to define superclasses of user objects

View File

@ -120,7 +120,7 @@ module RI
ri zip ri zip
Note that shell quoting may be required for method names Note that shell quoting may be required for method names
containing puncuation: containing punctuation:
ri 'Array.[]' ri 'Array.[]'
ri compact\\! ri compact\\!
@ -150,7 +150,7 @@ module RI
end end
puts puts
end end
puts "Options may also be passed in the 'RI' environment varaible" puts "Options may also be passed in the 'RI' environment variable"
exit 0 exit 0
end end
end end