[Bug #910] optparse with regexp


#1

Bug #910: optparse with regexp
http://redmine.ruby-lang.org/issues/show/910

e$B5/I<<Te(B: rubikitch .
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal

optparsee$B$G%*%W%7%g%s0z?t$K%^%C%A$9$Y$-@55,I=8=$r;XDj$7$?>l9g$N5sF0$,JQ$o$C$F$$$^$9!#e(B

#!/usr/local/bin/ruby
require ‘optparse’
opts = {}
ARGV.options do |o|
o.on("-T [level]", /^[0-4]$/) {|x| opts[:T] = x }
o.parse!
end
puts “opts=#{opts.inspect}”

$ ruby187p72 -v optparse-regexp.rb -T1
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-linux]
opts={:T=>“1”}
$ ruby19 -v optparse-regexp.rb -T1
ruby 1.9.1 (2008-12-20 revision 20892) [i686-linux]
opts={:T=>[“1”]}


#2

e$B%A%1%C%He(B #910 e$B$,99?7$5$l$^$7$?!#e(B (by Nobuyoshi N.)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B

Bug #909 [ruby-dev:37514]e$B$H=EJ#e(B

http://redmine.ruby-lang.org/issues/show/910


#3

e$B%A%1%C%He(B #910 e$B$,99?7$5$l$^$7$?!#e(B (by Nobuyoshi N.)

e$B%9%F!<%?%9e(B Assignede$B$+$ie(BClosede$B$KJQ99e(B

r20902

http://redmine.ruby-lang.org/issues/show/910


#4

e$B%A%1%C%He(B #910 e$B$,99?7$5$l$^$7$?!#e(B (by Yuki S.)

e$B%9%F!<%?%9e(B Closede$B$+$ie(BAssignede$B$KJQ99e(B

1.9e$B$G$O$^$@H/@8$7$^$9!#e(B

http://redmine.ruby-lang.org/issues/show/910