1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib: fixed typo. a patch by Sho Hashimoto in [ruby-dev:40716].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-03-20 03:30:59 +00:00
parent 772cc7a4f2
commit c9dd4823d9
21 changed files with 32 additions and 28 deletions

View file

@ -1,3 +1,7 @@
Sat Mar 20 12:30:54 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib: fixed typo. a patch by Sho Hashimoto in [ruby-dev:40716].
Sat Mar 20 11:32:18 2010 Tanaka Akira <akr@fsij.org> Sat Mar 20 11:32:18 2010 Tanaka Akira <akr@fsij.org>
* tool/transcode-tblgen.rb (each_firstbyte_range): tuned for less * tool/transcode-tblgen.rb (each_firstbyte_range): tuned for less

View file

@ -408,7 +408,7 @@ class CGI
# values is an Array. # values is an Array.
attr_reader :params attr_reader :params
# Get the uploaed files as a hash of name=>values pairs # Get the uploaded files as a hash of name=>values pairs
attr_reader :files attr_reader :files
# Set all the parameters. # Set all the parameters.

View file

@ -455,7 +455,7 @@ class CGI
# image_button("url", "name", "string") # image_button("url", "name", "string")
# # <INPUT TYPE="image" SRC="url" NAME="name" ALT="string"> # # <INPUT TYPE="image" SRC="url" NAME="name" ALT="string">
# #
# image_button("SRC" => "url", "ATL" => "strng") # image_button("SRC" => "url", "ALT" => "string")
# # <INPUT TYPE="image" SRC="url" ALT="string"> # # <INPUT TYPE="image" SRC="url" ALT="string">
def image_button(src = "", name = nil, alt = nil) def image_button(src = "", name = nil, alt = nil)
attributes = if src.kind_of?(String) attributes = if src.kind_of?(String)

View file

@ -1212,7 +1212,7 @@ class CSV
# Note that a passed String *is* modfied by this method. Call dup() before # Note that a passed String *is* modfied by this method. Call dup() before
# passing if you need a new String. # passing if you need a new String.
# #
# The +options+ parameter can be anthing CSV::new() understands. This method # The +options+ parameter can be anything CSV::new() understands. This method
# understands an additional <tt>:encoding</tt> parameter when not passed a # understands an additional <tt>:encoding</tt> parameter when not passed a
# String to set the base Encoding for the output. CSV needs this hint if you # String to set the base Encoding for the output. CSV needs this hint if you
# plan to output non-ASCII compatible data. # plan to output non-ASCII compatible data.
@ -1238,7 +1238,7 @@ class CSV
# This method is a shortcut for converting a single row (Array) into a CSV # This method is a shortcut for converting a single row (Array) into a CSV
# String. # String.
# #
# The +options+ parameter can be anthing CSV::new() understands. This method # The +options+ parameter can be anything CSV::new() understands. This method
# understands an additional <tt>:encoding</tt> parameter to set the base # understands an additional <tt>:encoding</tt> parameter to set the base
# Encoding for the output. This method will try to guess your Encoding from # Encoding for the output. This method will try to guess your Encoding from
# the first non-+nil+ field in +row+, if possible, but you may need to use # the first non-+nil+ field in +row+, if possible, but you may need to use
@ -1372,7 +1372,7 @@ class CSV
# a into an Array. Note that if +line+ contains multiple rows, anything # a into an Array. Note that if +line+ contains multiple rows, anything
# beyond the first row is ignored. # beyond the first row is ignored.
# #
# The +options+ parameter can be anthing CSV::new() understands. # The +options+ parameter can be anything CSV::new() understands.
# #
def self.parse_line(line, options = Hash.new) def self.parse_line(line, options = Hash.new)
new(line, options).shift new(line, options).shift

View file

@ -444,7 +444,7 @@ class IPAddr
# automatically from a specified string, you can specify one # automatically from a specified string, you can specify one
# explicitly by the optional second argument. # explicitly by the optional second argument.
# #
# Otherwise an IP addess is generated from a packed in_addr value # Otherwise an IP address is generated from a packed in_addr value
# and an address family. # and an address family.
# #
# The IPAddr class defines many methods and operators, and some of # The IPAddr class defines many methods and operators, and some of
@ -472,7 +472,7 @@ class IPAddr
#Socket.getaddrinfo(left, nil, Socket::AF_INET6, Socket::SOCK_STREAM, nil, #Socket.getaddrinfo(left, nil, Socket::AF_INET6, Socket::SOCK_STREAM, nil,
# Socket::AI_NUMERICHOST) # Socket::AI_NUMERICHOST)
begin begin
IPSocket.getaddress(prefix) # test if address is vaild IPSocket.getaddress(prefix) # test if address is valid
rescue rescue
raise ArgumentError, "invalid address" raise ArgumentError, "invalid address"
end end

View file

@ -25,7 +25,7 @@ module IRB
end end
module_function :def_notifier module_function :def_notifier
class AbstructNotifier class AbstractNotifier
def initialize(prefix, base_notifier) def initialize(prefix, base_notifier)
@prefix = prefix @prefix = prefix
@base_notifier = base_notifier @base_notifier = base_notifier
@ -72,7 +72,7 @@ module IRB
end end
end end
class CompositeNotifier<AbstructNotifier class CompositeNotifier<AbstractNotifier
def initialize(prefix, base_notifier) def initialize(prefix, base_notifier)
super super
@ -93,7 +93,7 @@ module IRB
def level_notifier=(value) def level_notifier=(value)
case value case value
when AbstructNotifier when AbstractNotifier
@level_notifier = value @level_notifier = value
when Integer when Integer
l = @notifiers[value] l = @notifiers[value]
@ -107,7 +107,7 @@ module IRB
alias level= level_notifier= alias level= level_notifier=
end end
class LeveledNotifier<AbstructNotifier class LeveledNotifier<AbstractNotifier
include Comparable include Comparable
def initialize(base, level, prefix) def initialize(base, level, prefix)

View file

@ -1,5 +1,5 @@
# #
# output-method.rb - optput methods used by irb # output-method.rb - output methods used by irb
# $Release Version: 0.9.6$ # $Release Version: 0.9.6$
# $Revision$ # $Revision$
# by Keiju ISHITSUKA(keiju@ruby-lang.org) # by Keiju ISHITSUKA(keiju@ruby-lang.org)

View file

@ -75,7 +75,7 @@ class XMP
if @encoding and exps.encoding != @encoding if @encoding and exps.encoding != @encoding
enc = Encoding.compatible?(@exps.join("\n"), exps) enc = Encoding.compatible?(@exps.join("\n"), exps)
if enc.nil? if enc.nil?
raise Encoding::CompatibilityError, "Encoding in which the passed exression is encoded is not compatible to the preceding's one" raise Encoding::CompatibilityError, "Encoding in which the passed expression is encoded is not compatible to the preceding's one"
else else
@encoding = enc @encoding = enc
end end

View file

@ -71,7 +71,7 @@ It can be replaced by the following code:
: verify_mode, verify_mode=((|mode|)) : verify_mode, verify_mode=((|mode|))
Sets the flags for server the certification verification at Sets the flags for server the certification verification at
begining of SSL/TLS session. beginning of SSL/TLS session.
OpenSSL::SSL::VERIFY_NONE or OpenSSL::SSL::VERIFY_PEER is acceptable. OpenSSL::SSL::VERIFY_NONE or OpenSSL::SSL::VERIFY_PEER is acceptable.
: verify_callback, verify_callback=((|proc|)) : verify_callback, verify_callback=((|proc|))

View file

@ -118,7 +118,7 @@ module Net
# Net::SMTP.start('your.smtp.server', 25) do |smtp| # Net::SMTP.start('your.smtp.server', 25) do |smtp|
# smtp.send_message msgstr, # smtp.send_message msgstr,
# 'your@mail.address', # 'your@mail.address',
# 'his_addess@example.com' # 'his_address@example.com'
# end # end
# #
# === Closing the Session # === Closing the Session

View file

@ -1563,7 +1563,7 @@ class OptionParser
yesno = CompletingHash.new yesno = CompletingHash.new
%w[- no false].each {|el| yesno[el] = false} %w[- no false].each {|el| yesno[el] = false}
%w[+ yes true].each {|el| yesno[el] = true} %w[+ yes true].each {|el| yesno[el] = true}
yesno['nil'] = false # shoud be nil? yesno['nil'] = false # should be nil?
accept(TrueClass, yesno) {|arg, val| val == nil or val} accept(TrueClass, yesno) {|arg, val| val == nil or val}
# #
# Similar to TrueClass, but defaults to false. # Similar to TrueClass, but defaults to false.

View file

@ -473,7 +473,7 @@ class Prime
end end
end end
# Provides a +Prime+ object with compatibility to Ruby 1.8 when instanciated via +Prime+.+new+. # Provides a +Prime+ object with compatibility to Ruby 1.8 when instantiated via +Prime+.+new+.
module OldCompatibility module OldCompatibility
# Returns the next prime number and forwards internal pointer. # Returns the next prime number and forwards internal pointer.
def succ def succ

View file

@ -1,4 +1,4 @@
# Define a package task libarary to aid in the definition of # Define a package task library to aid in the definition of
# redistributable package files. # redistributable package files.
require 'rake' require 'rake'

View file

@ -25,7 +25,7 @@ module REXML
# Create a new entity. Simple entities can be constructed by passing a # Create a new entity. Simple entities can be constructed by passing a
# name, value to the constructor; this creates a generic, plain entity # name, value to the constructor; this creates a generic, plain entity
# reference. For anything more complicated, you have to pass a Source to # reference. For anything more complicated, you have to pass a Source to
# the constructor with the entity definiton, or use the accessor methods. # the constructor with the entity definition, or use the accessor methods.
# +WARNING+: There is no validation of entity state except when the entity # +WARNING+: There is no validation of entity state except when the entity
# is read from a stream. If you start poking around with the accessors, # is read from a stream. If you start poking around with the accessors,
# you can easily create a non-conformant Entity. The best thing to do is # you can easily create a non-conformant Entity. The best thing to do is

View file

@ -310,7 +310,7 @@ module Gem
## ##
# Find the full path to the executable for gem +name+. If the +exec_name+ # Find the full path to the executable for gem +name+. If the +exec_name+
# is not given, the gem's default_executable is chosen, otherwise the # is not given, the gem's default_executable is chosen, otherwise the
# specifed executable's path is returned. +version_requirements+ allows you # specified executable's path is returned. +version_requirements+ allows you
# to specify specific gem versions. # to specify specific gem versions.
def self.bin_path(name, exec_name = nil, *version_requirements) def self.bin_path(name, exec_name = nil, *version_requirements)

View file

@ -159,7 +159,7 @@ class Gem::Commands::DependencyCommand < Gem::Command
response response
end end
# Retuns list of [specification, dep] that are satisfied by spec. # Returns list of [specification, dep] that are satisfied by spec.
def find_reverse_dependencies(spec) def find_reverse_dependencies(spec)
result = [] result = []

View file

@ -53,7 +53,7 @@ class Gem::SpecFetcher
end end
## ##
# Retuns the local directory to write +uri+ to. # Returns the local directory to write +uri+ to.
def cache_dir(uri) def cache_dir(uri)
File.join @dir, "#{uri.host}%#{uri.port}", File.dirname(uri.path) File.join @dir, "#{uri.host}%#{uri.port}", File.dirname(uri.path)

View file

@ -35,7 +35,7 @@ class Shell
install_builtin_commands install_builtin_commands
# define CommandProccessor#methods to Shell#methods and Filter#methods # define CommandProcessor#methods to Shell#methods and Filter#methods
for m in CommandProcessor.instance_methods(false) - NoDelegateMethods for m in CommandProcessor.instance_methods(false) - NoDelegateMethods
add_delegate_command_to_shell(m) add_delegate_command_to_shell(m)
end end

View file

@ -191,7 +191,7 @@ class Shell
@active_jobs.delete command @active_jobs.delete command
ProcessController.inactivate(self) ProcessController.inactivate(self)
if @active_jobs.empty? if @active_jobs.empty?
command.notify("start_jon in ierminate_jon(%id)", Shell::debug?) command.notify("start_job in terminate_job(%id)", Shell::debug?)
start_job start_job
end end
end end
@ -281,13 +281,13 @@ class Shell
command.notify("job(%id) start to waiting finish.", @shell.debug?) command.notify("job(%id) start to waiting finish.", @shell.debug?)
_pid = Process.waitpid(pid, nil) _pid = Process.waitpid(pid, nil)
rescue Errno::ECHILD rescue Errno::ECHILD
command.notify "warn: job(%id) was done already waitipd." command.notify "warn: job(%id) was done already waitpid."
_pid = true _pid = true
# rescue # rescue
# STDERR.puts $! # STDERR.puts $!
ensure ensure
command.notify("Job(%id): Wait to finish when Process finished.", @shell.debug?) command.notify("Job(%id): Wait to finish when Process finished.", @shell.debug?)
# when the process ends, wait until the command termintes # when the process ends, wait until the command terminates
if USING_AT_EXIT_WHEN_PROCESS_EXIT or _pid if USING_AT_EXIT_WHEN_PROCESS_EXIT or _pid
else else
command.notify("notice: Process finishing...", command.notify("notice: Process finishing...",

View file

@ -2,7 +2,7 @@
# thwait.rb - thread synchronization class # thwait.rb - thread synchronization class
# $Release Version: 0.9 $ # $Release Version: 0.9 $
# $Revision: 1.3 $ # $Revision: 1.3 $
# by Keiju ISHITSUKA(Nihpon Rational Software Co.,Ltd.) # by Keiju ISHITSUKA(Nihon Rational Software Co.,Ltd.)
# #
# -- # --
# feature: # feature:

View file

@ -133,7 +133,7 @@ the same class.
begin begin
ret = obj.call(*args) # call the original service-method ret = obj.call(*args) # call the original service-method
# could convert the return value # could convert the return value
resuce rescue
# rescue exceptions # rescue exceptions
end end
} }