зеркало из https://github.com/github/ruby.git
* 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:
Родитель
772cc7a4f2
Коммит
c9dd4823d9
|
@ -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>
|
||||
|
||||
* tool/transcode-tblgen.rb (each_firstbyte_range): tuned for less
|
||||
|
|
|
@ -408,7 +408,7 @@ class CGI
|
|||
# values is an Array.
|
||||
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
|
||||
|
||||
# Set all the parameters.
|
||||
|
|
|
@ -455,7 +455,7 @@ class CGI
|
|||
# image_button("url", "name", "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">
|
||||
def image_button(src = "", name = nil, alt = nil)
|
||||
attributes = if src.kind_of?(String)
|
||||
|
|
|
@ -1212,7 +1212,7 @@ class CSV
|
|||
# Note that a passed String *is* modfied by this method. Call dup() before
|
||||
# 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
|
||||
# String to set the base Encoding for the output. CSV needs this hint if you
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
|
@ -1372,7 +1372,7 @@ class CSV
|
|||
# a into an Array. Note that if +line+ contains multiple rows, anything
|
||||
# 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)
|
||||
new(line, options).shift
|
||||
|
|
|
@ -444,7 +444,7 @@ class IPAddr
|
|||
# automatically from a specified string, you can specify one
|
||||
# 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.
|
||||
#
|
||||
# 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::AI_NUMERICHOST)
|
||||
begin
|
||||
IPSocket.getaddress(prefix) # test if address is vaild
|
||||
IPSocket.getaddress(prefix) # test if address is valid
|
||||
rescue
|
||||
raise ArgumentError, "invalid address"
|
||||
end
|
||||
|
|
|
@ -25,7 +25,7 @@ module IRB
|
|||
end
|
||||
module_function :def_notifier
|
||||
|
||||
class AbstructNotifier
|
||||
class AbstractNotifier
|
||||
def initialize(prefix, base_notifier)
|
||||
@prefix = prefix
|
||||
@base_notifier = base_notifier
|
||||
|
@ -72,7 +72,7 @@ module IRB
|
|||
end
|
||||
end
|
||||
|
||||
class CompositeNotifier<AbstructNotifier
|
||||
class CompositeNotifier<AbstractNotifier
|
||||
def initialize(prefix, base_notifier)
|
||||
super
|
||||
|
||||
|
@ -93,7 +93,7 @@ module IRB
|
|||
|
||||
def level_notifier=(value)
|
||||
case value
|
||||
when AbstructNotifier
|
||||
when AbstractNotifier
|
||||
@level_notifier = value
|
||||
when Integer
|
||||
l = @notifiers[value]
|
||||
|
@ -107,7 +107,7 @@ module IRB
|
|||
alias level= level_notifier=
|
||||
end
|
||||
|
||||
class LeveledNotifier<AbstructNotifier
|
||||
class LeveledNotifier<AbstractNotifier
|
||||
include Comparable
|
||||
|
||||
def initialize(base, level, prefix)
|
||||
|
|
|
@ -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$
|
||||
# $Revision$
|
||||
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
|
||||
|
|
|
@ -75,7 +75,7 @@ class XMP
|
|||
if @encoding and exps.encoding != @encoding
|
||||
enc = Encoding.compatible?(@exps.join("\n"), exps)
|
||||
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
|
||||
@encoding = enc
|
||||
end
|
||||
|
|
|
@ -71,7 +71,7 @@ It can be replaced by the following code:
|
|||
|
||||
: verify_mode, verify_mode=((|mode|))
|
||||
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.
|
||||
|
||||
: verify_callback, verify_callback=((|proc|))
|
||||
|
|
|
@ -118,7 +118,7 @@ module Net
|
|||
# Net::SMTP.start('your.smtp.server', 25) do |smtp|
|
||||
# smtp.send_message msgstr,
|
||||
# 'your@mail.address',
|
||||
# 'his_addess@example.com'
|
||||
# 'his_address@example.com'
|
||||
# end
|
||||
#
|
||||
# === Closing the Session
|
||||
|
|
|
@ -1563,7 +1563,7 @@ class OptionParser
|
|||
yesno = CompletingHash.new
|
||||
%w[- no false].each {|el| yesno[el] = false}
|
||||
%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}
|
||||
#
|
||||
# Similar to TrueClass, but defaults to false.
|
||||
|
|
|
@ -473,7 +473,7 @@ class Prime
|
|||
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
|
||||
# Returns the next prime number and forwards internal pointer.
|
||||
def succ
|
||||
|
|
|
@ -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.
|
||||
|
||||
require 'rake'
|
||||
|
|
|
@ -25,7 +25,7 @@ module REXML
|
|||
# Create a new entity. Simple entities can be constructed by passing a
|
||||
# name, value to the constructor; this creates a generic, plain entity
|
||||
# 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
|
||||
# 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
|
||||
|
|
|
@ -310,7 +310,7 @@ module Gem
|
|||
##
|
||||
# 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
|
||||
# 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.
|
||||
|
||||
def self.bin_path(name, exec_name = nil, *version_requirements)
|
||||
|
|
|
@ -159,7 +159,7 @@ class Gem::Commands::DependencyCommand < Gem::Command
|
|||
response
|
||||
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)
|
||||
result = []
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ class Gem::SpecFetcher
|
|||
end
|
||||
|
||||
##
|
||||
# Retuns the local directory to write +uri+ to.
|
||||
# Returns the local directory to write +uri+ to.
|
||||
|
||||
def cache_dir(uri)
|
||||
File.join @dir, "#{uri.host}%#{uri.port}", File.dirname(uri.path)
|
||||
|
|
|
@ -35,7 +35,7 @@ class Shell
|
|||
|
||||
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
|
||||
add_delegate_command_to_shell(m)
|
||||
end
|
||||
|
|
|
@ -191,7 +191,7 @@ class Shell
|
|||
@active_jobs.delete command
|
||||
ProcessController.inactivate(self)
|
||||
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
|
||||
end
|
||||
end
|
||||
|
@ -281,13 +281,13 @@ class Shell
|
|||
command.notify("job(%id) start to waiting finish.", @shell.debug?)
|
||||
_pid = Process.waitpid(pid, nil)
|
||||
rescue Errno::ECHILD
|
||||
command.notify "warn: job(%id) was done already waitipd."
|
||||
command.notify "warn: job(%id) was done already waitpid."
|
||||
_pid = true
|
||||
# rescue
|
||||
# STDERR.puts $!
|
||||
ensure
|
||||
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
|
||||
else
|
||||
command.notify("notice: Process finishing...",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# thwait.rb - thread synchronization class
|
||||
# $Release Version: 0.9 $
|
||||
# $Revision: 1.3 $
|
||||
# by Keiju ISHITSUKA(Nihpon Rational Software Co.,Ltd.)
|
||||
# by Keiju ISHITSUKA(Nihon Rational Software Co.,Ltd.)
|
||||
#
|
||||
# --
|
||||
# feature:
|
||||
|
|
|
@ -133,7 +133,7 @@ the same class.
|
|||
begin
|
||||
ret = obj.call(*args) # call the original service-method
|
||||
# could convert the return value
|
||||
resuce
|
||||
rescue
|
||||
# rescue exceptions
|
||||
end
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче