* 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:
parent
ce6af3e8a0
commit
8d69c7f116
@ -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>
|
Mon Dec 4 19:16:39 2006 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
* ext/digest/lib/digest/hmac.rb: Do alias << update.
|
* ext/digest/lib/digest/hmac.rb: Do alias << update.
|
||||||
|
@ -122,10 +122,10 @@ def makedirs(dirs)
|
|||||||
super(dirs, :mode => 0755) unless dirs.empty?
|
super(dirs, :mode => 0755) unless dirs.empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
def install_recursive(src, dest, options = {})
|
def install_recursive(srcdir, dest, options = {})
|
||||||
noinst = options.delete(:no_install)
|
noinst = options.delete(:no_install)
|
||||||
subpath = src.size..-1
|
subpath = srcdir.size..-1
|
||||||
Dir.glob("#{src}/**/*", File::FNM_DOTMATCH) do |src|
|
Dir.glob("#{srcdir}/**/*", File::FNM_DOTMATCH) do |src|
|
||||||
next if /\A\.{1,2}\z/ =~ (base = File.basename(src))
|
next if /\A\.{1,2}\z/ =~ (base = File.basename(src))
|
||||||
next if noinst and File.fnmatch?(noinst, File.basename(src))
|
next if noinst and File.fnmatch?(noinst, File.basename(src))
|
||||||
d = dest + src[subpath]
|
d = dest + src[subpath]
|
||||||
|
@ -663,9 +663,10 @@ class OptionParser
|
|||||||
# Completion for hash key.
|
# Completion for hash key.
|
||||||
#
|
#
|
||||||
def match(key)
|
def match(key)
|
||||||
return key, *fetch(key) {
|
*values = fetch(key) {
|
||||||
raise AmbiguousArgument, catch(:ambiguous) {return complete(key)}
|
raise AmbiguousArgument, catch(:ambiguous) {return complete(key)}
|
||||||
}
|
}
|
||||||
|
return key, *values
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user