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

* lib/optparse.rb (OptionParser#candidate): get rid of 1.9 syntax

so that BASERUBY can be 1.8.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-11-27 02:29:26 +00:00
parent e394ddd2f7
commit 7050069d80
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Sat Nov 27 11:29:24 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/optparse.rb (OptionParser#candidate): get rid of 1.9 syntax
so that BASERUBY can be 1.8.
Sat Nov 27 08:16:21 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* addr2line.c (rb_dump_backtrace_with_lines): should close fd on

View file

@ -1549,10 +1549,10 @@ XXX
end
pat = Completion.regexp(word, true)
visit(:each_option) do |opt|
opts = [*(opt.long if long), *(opt.short if short)]
opts = (long ? opt.long : []) + (short ? opt.short [])
opts = Completion.candidate(word, true, pat, &opts.method(:each)).map(&:first) if pat
if /\A=/ =~ opt.arg
opts = opts.map {|sw| sw + "="}
opts.map! {|sw| sw + "="}
if arg and CompletingHash === opt.pattern
if opts = opt.pattern.candidate(arg, false, argpat)
opts.map!(&:last)