[#9331] initialize arguments — WATANABE Hirofumi <Hirofumi.Watanabe@...>
わたなべです.
10 messages
2000/03/01
[#9332] Re: initialize arguments
— WATANABE Tetsuya <tetsu@...>
2000/03/01
渡辺哲也です。
[#9377] Hash.new('') — WATANABE Tetsuya <tetsu@...>
渡辺哲也です。
11 messages
2000/03/06
[#9383] rb_call_super() — Yasushi Shoji <yashi@...>
やすしです。
10 messages
2000/03/06
[#9388] Re: rb_call_super()
— Kazuhiro HIWADA <hiwada@...>
2000/03/07
ひわだです。
[#9395] Re: rb_call_super()
— matz@... (Yukihiro Matsumoto)
2000/03/07
まつもと ゆきひろです
[#9398] Re: rb_call_super()
— Yasushi Shoji <yashi@...>
2000/03/07
やすしです。
[#9393] [PATCH] Symbol.new — nobu.nakada@...
なかだです。
13 messages
2000/03/07
[#9396] Re: [PATCH] Symbol.new
— matz@... (Yukihiro Matsumoto)
2000/03/07
まつもと ゆきひろです
[#9424] method_missing(Fixnum) — nobu.nakada@...
なかだです。
5 messages
2000/03/11
[#9430] [BUG] Process.kill :symbol, pid — Koji Arai <JCA02266@...>
新井です。
5 messages
2000/03/12
[#9445] thread.rb — m_seki@...
18 messages
2000/03/16
[#9446] Re: thread.rb
— matz@... (Yukihiro Matsumoto)
2000/03/17
[#9460] Re: thread.rb
— m_seki@...
2000/03/21
[#9462] Re: thread.rb
— matz@... (Yukihiro Matsumoto)
2000/03/21
まつもと ゆきひろです
[#11281] Re: thread.rb
— Masatoshi SEKI <m_seki@...>
2000/10/22
[#11282] Re: thread.rb
— Yasushi Shoji <yashi@...>
2000/10/22
At Mon, 23 Oct 2000 00:14:30 +0900,
[#11283] Re: thread.rb
— Masatoshi SEKI <m_seki@...>
2000/10/22
[#11284] Re: thread.rb
— Yasushi Shoji <yashi@...>
2000/10/22
At Mon, 23 Oct 2000 01:40:14 +0900,
[#11288] sync/async message passing model (was Re: Re: thread.rb)
— kjana@... (YANAGAWA Kazuhisa)
2000/10/23
In message <20001022171627N.yashi@yashi.com>
[#11291] Re: sync/async message passing model (was Re: Re: thread.rb)
— kjana@... (YANAGAWA Kazuhisa)
2000/10/24
追加,追加.
[#9447] ParseDate.parsedate( "2000-03-16T23:45:54+0900" ) — "NAKAMURA, Hiroshi" <nakahiro@...>
なひです.
10 messages
2000/03/17
[#9448] Re: ParseDate.parsedate( "2000-03-16T23:45:54+0900" )
— Tadayoshi Funaba <tadf@...>
2000/03/17
ふなばです。
[#9449] Re: ParseDate.parsedate( "2000-03-16T23:45:54+0900" )
— matz@... (Yukihiro Matsumoto)
2000/03/18
まつもと ゆきひろです
[#9451] Re: ParseDate.parsedate( "2000-03-16T23:45:54+0900" )
— Tadayoshi Funaba <tadf@...>
2000/03/18
ふなばです。
[#9473] Symbol#<=> — Koji Arai <JCA02266@...>
新井です。
12 messages
2000/03/23
[#9477] Re: Symbol#<=>
— matz@... (Yukihiro Matsumoto)
2000/03/24
まつもと ゆきひろです
[#9483] Re: Symbol#<=>
— Koji Arai <JCA02266@...>
2000/03/24
新井です。
[#9489] parsedate2 — Tadayoshi Funaba <tadf@...>
ふなばです。
7 messages
2000/03/25
[#9498] timeout しない timeout — ARIMA Yasuhiro <fit0298@...>
有馬です。
20 messages
2000/03/26
[#9506] Re: timeout しない timeout
— matz@... (Yukihiro Matsumoto)
2000/03/27
まつもと ゆきひろです
[#9509] Re: timeout しない timeout
— gotoken@... (GOTO Kentaro)
2000/03/27
In message "[ruby-dev:9506] Re: timeout しない timeout"
[#9511] Re: timeout しない timeout
— matz@... (Yukihiro Matsumoto)
2000/03/27
まつもと ゆきひろです
[#9512] Re: timeout しない timeout
— ARIMA Yasuhiro <fit0298@...>
2000/03/27
有馬です。
[#9524] Re: timeout しない timeout
— ARIMA Yasuhiro <fit0298@...>
2000/03/29
有馬です。
[#9525] Re: timeout しない timeout
— gotoken@... (GOTO Kentaro)
2000/03/29
ごとけんです
[#9526] Re: timeout しない timeout
— ARIMA Yasuhiro <fit0298@...>
2000/03/29
有馬です。
[#9528] Re: timeout しない timeout
— gotoken@... (GOTO Kentaro)
2000/03/30
ごとけんです
[#9529] Re: timeout しない timeout
— ARIMA Yasuhiro <fit0298@...>
2000/03/30
有馬です。
[ruby-dev:9465] getopts
From:
Minero Aoki <aamine@...>
Date:
2000-03-22 04:29:32 UTC
List:
ruby-dev #9465
あおきです。
getopts ですが、実際の引数以外は実際にセットしてくれないので、
-d をつけると無駄な warning (uninitialized global variable) が
いっぱいでてしまいます。それがどーにも気にくわないので直してみました。
変更したところは、
* すべてのオプションに対し変数をセット
* メソッドは getopts ひとつだけ
* タブをスペースに変換
です。できればとりこんでもらえないでしょうか。
いちおう動作チェックはひととおりしてありますが、
元の getopts よりは動作実績がないのでなんとも言えません。
-------------------------------------------------------------------
あおきみねろう
#
# getopts.rb -
# $Release Version: $
# $Revision: 1.2 $
# $Date: 1999/08/13 05:45:16 $
# by Yasuo OHBA(SHL Japan Inc. Technology Dept.)
#
# --
#
# 2000-03-21
# modified by Minero Aoki <aamine@dp.u-netsurf.ne.jp>
#
$RCS_ID=%q$Header: /home/cvs/ruby/lib/getopts.rb,v 1.2 1999/08/13 05:45:16 matz Exp $
def getopts( single_opts, *options )
single_opts_exp = (single_opts && !single_opts.empty?) ?
/[#{single_opts}]/ : nil
single_colon_exp = nil
single_colon = nil
opt = arg = val = nil
boolopts = {}
valopts = {}
argv = ARGV
newargv = []
#
# set default
#
if single_opts then
single_opts.each_byte do |byte|
boolopts[ byte.chr ] = false
end
end
unless options.empty? then
single_colon = ''
options.each do |opt|
m = /\A([^:]+):(.*)\z/.match( opt )
if m then
valopts[ m[1] ] = m[2].empty? ? 0 : m[2]
else
boolopts[ opt ] = false
end
end
valopts.each do |opt, dflt|
if opt.size == 1 then
single_colon << opt
end
end
if single_colon.empty? then
single_colon = single_colon_exp = nil
else
single_colon_exp = /[#{single_colon}]/
end
end
#
# scan
#
c = 0
arg = argv.shift
while arg do
case arg
when /\A--?\z/ # xinit -- -bpp 24
newargv.concat argv
break
when /\A--(.*)/
opt = $1
if valopts.key? opt then # imclean --src +trash
return nil if argv.empty?
valopts[ opt ] = argv.shift
elsif boolopts.key? opt then # ruby --verbose
boolopts[ opt ] = true
else
return nil
end
c += 1
when /\A-(.+)/
arg = $1
0.upto( arg.size - 1 ) do |idx|
opt = arg[idx, 1]
if single_opts and single_opts_exp === opt then
boolopts[ opt ] = true # ruby -h
c += 1
elsif single_colon and single_colon_exp === opt then
val = arg[ (idx+1)..-1 ]
if val.empty? then # ruby -e 'p $:'
return nil if argv.empty?
valopts[ opt ] = argv.shift
else # cc -ohello ...
valopts[ opt ] = val
end
c += 1
break
else
return nil
end
end
else # ruby test.rb
newargv.push arg
end
arg = argv.shift
end
#
# set
#
boolopts.each do |opt, val|
eval "$OPT_#{opt} = val"
end
valopts.each do |opt, val|
eval "$OPT_#{opt} = #{val == 0 ? 'nil' : 'val'}"
end
argv.replace newargv
c
end