diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/erb.rb | 4 | ||||
-rw-r--r-- | lib/irb/completion.rb | 2 | ||||
-rw-r--r-- | lib/irb/init.rb | 6 | ||||
-rw-r--r-- | lib/irb/inspector.rb | 16 | ||||
-rw-r--r-- | lib/irb/locale.rb | 2 | ||||
-rw-r--r-- | lib/irb/ruby-lex.rb | 4 | ||||
-rw-r--r-- | lib/mkmf.rb | 6 | ||||
-rw-r--r-- | lib/net/imap.rb | 2 | ||||
-rw-r--r-- | lib/rdoc/markup/formatter_test_case.rb | 6 | ||||
-rw-r--r-- | lib/rdoc/parser.rb | 2 | ||||
-rw-r--r-- | lib/rdoc/parser/ruby.rb | 2 | ||||
-rw-r--r-- | lib/rdoc/ruby_lex.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/commands/server_command.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/ext/builder.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/package/tar_writer.rb | 2 | ||||
-rwxr-xr-x | lib/set.rb | 20 | ||||
-rw-r--r-- | lib/thwait.rb | 4 | ||||
-rw-r--r-- | lib/tracer.rb | 8 | ||||
-rw-r--r-- | lib/uri/common.rb | 14 | ||||
-rw-r--r-- | lib/uri/ftp.rb | 2 | ||||
-rw-r--r-- | lib/uri/generic.rb | 12 | ||||
-rw-r--r-- | lib/webrick/httpservlet/filehandler.rb | 4 | ||||
-rw-r--r-- | lib/yaml/dbm.rb | 4 |
23 files changed, 64 insertions, 64 deletions
diff --git a/lib/erb.rb b/lib/erb.rb index 5a5af10230..0ddaa5000d 100644 --- a/lib/erb.rb +++ b/lib/erb.rb @@ -266,7 +266,7 @@ end # ERB::Compiler class ERB # = ERB::Compiler - # + # # Compiles ERB templates into Ruby code; the compiled code produces the # template result when evaluated. ERB::Compiler provides hooks to define how # generated output is handled. @@ -308,7 +308,7 @@ class ERB # # obj = 'It' # eval code - # + # # Evaluate using an input: # # mod = Module.new diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb index ee5cf69409..3f161a2ff7 100644 --- a/lib/irb/completion.rb +++ b/lib/irb/completion.rb @@ -154,7 +154,7 @@ module IRB begin candidates = [] rec = eval(receiver, bind) - if sep == "::" and rec.kind_of?(Module) + if sep == "::" and rec.kind_of?(Module) candidates = rec.constants.collect{|m| m.to_s} end candidates |= rec.methods.collect{|m| m.to_s} diff --git a/lib/irb/init.rb b/lib/irb/init.rb index 2d7ff3146e..fce2df4f09 100644 --- a/lib/irb/init.rb +++ b/lib/irb/init.rb @@ -112,9 +112,9 @@ module IRB # @CONF[:LC_MESSAGES] = "en" @CONF[:LC_MESSAGES] = Locale.new - + @CONF[:AT_EXIT] = [] - + @CONF[:DEBUG_LEVEL] = 1 end @@ -160,7 +160,7 @@ module IRB opt = $1 || ARGV.shift set_encoding(*opt.split(':', 2)) when "--inspect" - if /^-/ !~ ARGV.first + if /^-/ !~ ARGV.first @CONF[:INSPECT_MODE] = ARGV.shift else @CONF[:INSPECT_MODE] = true diff --git a/lib/irb/inspector.rb b/lib/irb/inspector.rb index ab5128399e..aefe077f37 100644 --- a/lib/irb/inspector.rb +++ b/lib/irb/inspector.rb @@ -7,7 +7,7 @@ # # -- # -# +# # module IRB @@ -57,13 +57,13 @@ module IRB # else # inspector = IRB::Inspector(block, init_p) # end - + if block_given? inspector = IRB::Inspector(block, arg) else inspector = arg end - + case key when Array for k in key @@ -81,7 +81,7 @@ module IRB end INSPECTORS.def_inspector([false, :to_s, :raw]){|v| v.to_s} - INSPECTORS.def_inspector([true, :p, :inspect]){|v| + INSPECTORS.def_inspector([true, :p, :inspect]){|v| begin v.inspect rescue NoMethodError @@ -89,7 +89,7 @@ module IRB end } INSPECTORS.def_inspector([:pp, :pretty_inspect], proc{require "pp"}){|v| v.pretty_inspect.chomp} - INSPECTORS.def_inspector([:yaml, :YAML], proc{require "yaml"}){|v| + INSPECTORS.def_inspector([:yaml, :YAML], proc{require "yaml"}){|v| begin YAML.dump(v) rescue @@ -98,12 +98,12 @@ module IRB end } - INSPECTORS.def_inspector([:marshal, :Marshal, :MARSHAL, Marshal]){|v| + INSPECTORS.def_inspector([:marshal, :Marshal, :MARSHAL, Marshal]){|v| Marshal.dump(v) } end - - + + diff --git a/lib/irb/locale.rb b/lib/irb/locale.rb index 77cc06ed30..7781006da4 100644 --- a/lib/irb/locale.rb +++ b/lib/irb/locale.rb @@ -136,7 +136,7 @@ module IRB end # @param paths load paths in which IRB find a localized file. - # @param dir directory + # @param dir directory # @param file basename to be localized # # typically, for the parameters and a <path> in paths, it searches diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index 30fecf7033..2414e5cffd 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -1100,7 +1100,7 @@ class RubyLex @indent = 0 @indent_stack = [] @lex_state = EXPR_BEG - + loop do @continue = false prompt @@ -1119,7 +1119,7 @@ class RubyLex @quoted = reserve_quoted end end - + def identify_comment @ltype = "#" diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 8e42483ddb..e66608f21a 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -601,7 +601,7 @@ int main() {printf("%d\\n", conftest_const); return 0;} end # You should use +have_func+ rather than +try_func+. -# +# # [+func+] a String which contains a symbol name # [+libs+] a String which contains library names. # [+headers+] a String or an Array of strings which contains @@ -691,7 +691,7 @@ def macro_defined?(macro, src, opt = "", &b) SRC end -# Returns whether or not +# Returns whether or not # * the +src+ can be compiled as a C source, # * the result object can be linked with its depending libraries successfully, # * the linked file can be invoked as an executable @@ -1754,7 +1754,7 @@ end # Processes the data contents of the "depend" file. # Each line of this file is expected to be a file name. -# +# # Returns the output of findings, in Makefile format. # def depend_rules(depend) diff --git a/lib/net/imap.rb b/lib/net/imap.rb index 0b76a9ff4a..9a815d5678 100644 --- a/lib/net/imap.rb +++ b/lib/net/imap.rb @@ -313,7 +313,7 @@ module Net @receiver_thread.join synchronize do unless @sock.closed? - @sock.close + @sock.close end end raise e if e diff --git a/lib/rdoc/markup/formatter_test_case.rb b/lib/rdoc/markup/formatter_test_case.rb index dd755c55d1..26dc4b25e9 100644 --- a/lib/rdoc/markup/formatter_test_case.rb +++ b/lib/rdoc/markup/formatter_test_case.rb @@ -90,7 +90,7 @@ class RDoc::Markup::FormatterTestCase < MiniTest::Unit::TestCase ## # Calls start_accepting which needs to verify startup state - + def test_start_accepting @to.start_accepting @@ -100,7 +100,7 @@ class RDoc::Markup::FormatterTestCase < MiniTest::Unit::TestCase ## # Calls end_accepting on your test case which needs to call # <tt>@to.end_accepting</tt> and verify document generation - + def test_end_accepting @to.start_accepting @to.res << 'hi' @@ -196,7 +196,7 @@ class RDoc::Markup::FormatterTestCase < MiniTest::Unit::TestCase @to.start_accepting @to.accept_heading @RM::Heading.new(1, '\\Hello') - + accept_heading_suppressed_crossref end diff --git a/lib/rdoc/parser.rb b/lib/rdoc/parser.rb index 4644324fc7..b2559fa3a9 100644 --- a/lib/rdoc/parser.rb +++ b/lib/rdoc/parser.rb @@ -185,7 +185,7 @@ class RDoc::Parser end ## - # Creates a new Parser storing +top_level+, +file_name+, +content+, + # Creates a new Parser storing +top_level+, +file_name+, +content+, # +options+ and +stats+ in instance variables. # # Usually invoked by +super+ diff --git a/lib/rdoc/parser/ruby.rb b/lib/rdoc/parser/ruby.rb index 6bf1c8d308..4d273598be 100644 --- a/lib/rdoc/parser/ruby.rb +++ b/lib/rdoc/parser/ruby.rb @@ -1560,7 +1560,7 @@ class RDoc::Parser::Ruby < RDoc::Parser else new_methods = [] - case vis_type + case vis_type when 'module_function' then args = parse_symbol_arg container.set_visibility_for args, :private, false diff --git a/lib/rdoc/ruby_lex.rb b/lib/rdoc/ruby_lex.rb index 60d4a4c76b..13e86728c9 100644 --- a/lib/rdoc/ruby_lex.rb +++ b/lib/rdoc/ruby_lex.rb @@ -407,7 +407,7 @@ class RDoc::RubyLex (ch = getc) res << ch end - + gets # consume =end @ltype = nil diff --git a/lib/rubygems/commands/server_command.rb b/lib/rubygems/commands/server_command.rb index 0d18a82201..c59f216262 100644 --- a/lib/rubygems/commands/server_command.rb +++ b/lib/rubygems/commands/server_command.rb @@ -50,7 +50,7 @@ class Gem::Commands::ServerCommand < Gem::Command options[:addresses].push(*address) end - add_option '-l', '--launch[=COMMAND]', + add_option '-l', '--launch[=COMMAND]', 'launches a browser window', "COMMAND defaults to 'start' on Windows", "and 'open' on all other platforms" do |launch, options| diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb index 29d5af5b12..2a147d59f2 100644 --- a/lib/rubygems/ext/builder.rb +++ b/lib/rubygems/ext/builder.rb @@ -19,7 +19,7 @@ class Gem::Ext::Builder def self.make(dest_path, results) unless File.exist? 'Makefile' then - raise Gem::InstallError, "Makefile not found:\n\n#{results.join "\n"}" + raise Gem::InstallError, "Makefile not found:\n\n#{results.join "\n"}" end mf = File.read('Makefile') diff --git a/lib/rubygems/package/tar_writer.rb b/lib/rubygems/package/tar_writer.rb index aeb11ad6ce..823f20c88c 100644 --- a/lib/rubygems/package/tar_writer.rb +++ b/lib/rubygems/package/tar_writer.rb @@ -236,7 +236,7 @@ class Gem::Package::TarWriter name = newname if name.size > 100 or prefix.size > 155 then - raise Gem::Package::TooLongFileName + raise Gem::Package::TooLongFileName end end diff --git a/lib/set.rb b/lib/set.rb index 99197961b5..226641d725 100755 --- a/lib/set.rb +++ b/lib/set.rb @@ -482,35 +482,35 @@ class Set end end -# +# # SortedSet implements a Set that guarantees that it's element are # yielded in sorted order (according to the return values of their # #<=> methods) when iterating over them. -# +# # All elements that are added to a SortedSet must respond to the <=> # method for comparison. -# +# # Also, all elements must be <em>mutually comparable</em>: <tt>el1 <=> # el2</tt> must not return <tt>nil</tt> for any elements <tt>el1</tt> # and <tt>el2</tt>, else an ArgumentError will be raised when # iterating over the SortedSet. # # == Example -# +# # require "set" -# +# # set = SortedSet.new([2, 1, 5, 6, 4, 5, 3, 3, 3]) # ary = [] -# +# # set.each do |obj| # ary << obj # end -# +# # p ary # => [1, 2, 3, 4, 5, 6] -# +# # set2 = SortedSet.new([1, 2, "3"]) # set2.each { |obj| } # => raises ArgumentError: comparison of Fixnum with String failed -# +# class SortedSet < Set @@setup = false @@ -535,7 +535,7 @@ class SortedSet < Set @hash = RBTree.new super end - + def add(o) o.respond_to?(:<=>) or raise ArgumentError, "value must respond to <=>" super diff --git a/lib/thwait.rb b/lib/thwait.rb index 963ff4d1b6..4a98c1cbba 100644 --- a/lib/thwait.rb +++ b/lib/thwait.rb @@ -19,10 +19,10 @@ require "e2mmap.rb" # STDERR.puts "Thread #{t} has terminated." # end # -# +# # th = ThreadsWait.new(thread1,...) # th.next_wait # next one to be done -# +# # class ThreadsWait RCS_ID='-$Id: thwait.rb,v 1.3 1998/06/26 03:19:34 keiju Exp keiju $-' diff --git a/lib/tracer.rb b/lib/tracer.rb index 318b254ac8..d1e088b90e 100644 --- a/lib/tracer.rb +++ b/lib/tracer.rb @@ -1,11 +1,11 @@ -# tracer.rb - +# tracer.rb - # $Release Version: 0.3$ # $Revision: 1.12 $ # by Keiju ISHITSUKA([email protected]) # # -- # -# +# # require "thread" @@ -136,7 +136,7 @@ class Tracer return unless p.call event, file, line, id, binding, klass end - return unless Tracer::display_c_call? or + return unless Tracer::display_c_call? or event != "c-call" && event != "c-return" Tracer::stdout_mutex.synchronize do @@ -151,7 +151,7 @@ class Tracer printf("%s:%d:%s:%s: %s", file, line, - klass || '', + klass || '', EVENT_SYMBOL[event], source) end diff --git a/lib/uri/common.rb b/lib/uri/common.rb index 8d4e8c6d41..56c6946f28 100644 --- a/lib/uri/common.rb +++ b/lib/uri/common.rb @@ -10,9 +10,9 @@ # module URI - # + # # Includes URI::REGEXP::PATTERN - # + # module REGEXP # # Patterns used to parse URI's @@ -111,7 +111,7 @@ module URI # see also URI::Parser.initialize_pattern attr_reader :pattern - # The Hash of Regexp + # The Hash of Regexp # # see also URI::Parser.initialize_regexp attr_reader :regexp @@ -197,7 +197,7 @@ module URI # # == Description # - # parses +uri+ and constructs either matching URI scheme object + # parses +uri+ and constructs either matching URI scheme object # (FTP, HTTP, HTTPS, LDAP, LDAPS, or MailTo) or URI::Generic # # == Usage @@ -237,7 +237,7 @@ module URI uris.inject :merge end - # + # # :call-seq: # extract( str ) # extract( str, schemes ) @@ -279,7 +279,7 @@ module URI end end - # + # # :call-seq: # escape( str ) # escape( str, unsafe ) @@ -311,7 +311,7 @@ module URI end.force_encoding(Encoding::US_ASCII) end - # + # # :call-seq: # unescape( str ) # unescape( str, unsafe ) diff --git a/lib/uri/ftp.rb b/lib/uri/ftp.rb index 53e3b28645..26e4bb8326 100644 --- a/lib/uri/ftp.rb +++ b/lib/uri/ftp.rb @@ -151,7 +151,7 @@ module URI end end - # typecode accessor + # typecode accessor # # see URI::FTP::COMPONENT attr_reader :typecode diff --git a/lib/uri/generic.rb b/lib/uri/generic.rb index 1bf4bcb080..bd5594fc3c 100644 --- a/lib/uri/generic.rb +++ b/lib/uri/generic.rb @@ -251,7 +251,7 @@ module URI # returns the port component of the URI. # # URI("http://foo/bar/baz").port #=> "80" - # + # # URI("http://foo:8080/bar/baz").port #=> "8080" # attr_reader :port @@ -265,13 +265,13 @@ module URI # returns the path component of the URI. # # URI("http://foo/bar/baz").path #=> "/bar/baz" - # + # attr_reader :path # returns the query component of the URI. # # URI("http://foo/bar/baz?search=FooBar").query #=> "search=FooBar" - # + # attr_reader :query # returns the opaque part of the URI. @@ -287,7 +287,7 @@ module URI # returns the fragment component of the URI. # # URI("http://foo/bar/baz?search=FooBar#ponies").fragment #=> "ponies" - # + # attr_reader :fragment # returns the parser to be used. @@ -518,7 +518,7 @@ module URI # (with validation) # # see also URI::Generic.userinfo= - # + # def set_userinfo(user, password = nil) unless password user, password = split_userinfo(user) @@ -1081,7 +1081,7 @@ module URI end private :split_path - # + # # Merges a base path +base+, with relative path +rel+, # returns a modified base path. # diff --git a/lib/webrick/httpservlet/filehandler.rb b/lib/webrick/httpservlet/filehandler.rb index 263c9fc80f..8736f5773a 100644 --- a/lib/webrick/httpservlet/filehandler.rb +++ b/lib/webrick/httpservlet/filehandler.rb @@ -151,7 +151,7 @@ module WEBrick # at directory +root+ # # If +options+ is a Hash the following keys are allowed: - # + # # :AcceptableLanguages:: Array of languages allowed for accept-language # :DirectoryCallback:: Allows preprocessing of directory requests # :FancyIndexing:: If true, show an index for directories @@ -166,7 +166,7 @@ module WEBrick # # If +options+ is true or false then +:FancyIndexing+ is enabled or # disabled respectively. - + def initialize(server, root, options={}, default=Config::FileHandler) @config = server.config @logger = @config[:Logger] diff --git a/lib/yaml/dbm.rb b/lib/yaml/dbm.rb index 3801565ff8..07441f53ad 100644 --- a/lib/yaml/dbm.rb +++ b/lib/yaml/dbm.rb @@ -4,7 +4,7 @@ require 'dbm' module YAML # YAML + DBM = YDBM -# +# # YAML::DBM provides the same interface as ::DBM. # # However, while DBM only allows strings for both keys and values, @@ -199,7 +199,7 @@ class DBM < ::DBM a end - + # Converts the contents of the database to an in-memory Hash object, and # returns it. def to_hash |