* instruby.rb (install_recursive): get rid of warning.

* lib/optparse.rb (CompletingHash#match): get rid of splat failure.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2006-12-04 14:49:47 +00:00
parent ce6af3e8a0
commit 8d69c7f116
3 changed files with 18 additions and 11 deletions

View File

@ -1,3 +1,9 @@
Mon Dec 4 23:49:28 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
* instruby.rb (install_recursive): get rid of warning.
* lib/optparse.rb (CompletingHash#match): get rid of splat failure.
Mon Dec 4 19:16:39 2006 Akinori MUSHA <knu@iDaemons.org>
* ext/digest/lib/digest/hmac.rb: Do alias << update.

View File

@ -122,10 +122,10 @@ def makedirs(dirs)
super(dirs, :mode => 0755) unless dirs.empty?
end
def install_recursive(src, dest, options = {})
def install_recursive(srcdir, dest, options = {})
noinst = options.delete(:no_install)
subpath = src.size..-1
Dir.glob("#{src}/**/*", File::FNM_DOTMATCH) do |src|
subpath = srcdir.size..-1
Dir.glob("#{srcdir}/**/*", File::FNM_DOTMATCH) do |src|
next if /\A\.{1,2}\z/ =~ (base = File.basename(src))
next if noinst and File.fnmatch?(noinst, File.basename(src))
d = dest + src[subpath]

View File

@ -663,9 +663,10 @@ class OptionParser
# Completion for hash key.
#
def match(key)
return key, *fetch(key) {
*values = fetch(key) {
raise AmbiguousArgument, catch(:ambiguous) {return complete(key)}
}
return key, *values
end
end