ruby-changes:12826
From: naruse <ko1@a...>
Date: Sun, 16 Aug 2009 21:32:55 +0900 (JST)
Subject: [ruby-changes:12826] Ruby:r24555 (trunk): * lib/date/format.rb: suppressed a warning.
naruse 2009-08-16 21:32:35 +0900 (Sun, 16 Aug 2009) New Revision: 24555 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24555 Log: * lib/date/format.rb: suppressed a warning. * lib/irb/ruby-lex.rb: ditto. Modified files: trunk/ChangeLog trunk/lib/date/format.rb trunk/lib/irb/ruby-lex.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 24554) +++ ChangeLog (revision 24555) @@ -1,3 +1,9 @@ +Sun Aug 16 21:31:21 2009 NARUSE, Yui <naruse@r...> + + * lib/date/format.rb: suppressed a warning. + + * lib/irb/ruby-lex.rb: ditto. + Sun Aug 16 15:25:26 2009 NARUSE, Yui <naruse@r...> * lib/csv.rb: Change magic comment to US-ASCII in order to Index: lib/irb/ruby-lex.rb =================================================================== --- lib/irb/ruby-lex.rb (revision 24554) +++ lib/irb/ruby-lex.rb (revision 24555) @@ -407,7 +407,7 @@ if @lex_state != EXPR_END && @lex_state != EXPR_CLASS && (@lex_state != EXPR_ARG || @space_seen) c = peek(0) - if /\S/ =~ c && (/["'`]/ =~ c || /[\w_]/ =~ c || c == "-") + if /\S/ =~ c && (/["'`]/ =~ c || /\w/ =~ c || c == "-") tk = identify_here_document end end @@ -728,7 +728,7 @@ printf "MATCH: start %s: %s\n", op, io.inspect if RubyLex.debug? if peek(0) =~ /[0-9]/ t = identify_number - elsif peek(0) =~ /[\w_]/ + elsif peek(0) =~ /\w/ t = identify_identifier end printf "MATCH: end %s: %s\n", op, io.inspect if RubyLex.debug? Index: lib/date/format.rb =================================================================== --- lib/date/format.rb (revision 24554) +++ lib/date/format.rb (revision 24555) @@ -544,8 +544,8 @@ e._cent ||= if val >= 69 then 19 else 20 end when 'Z', /\A:{0,3}z/ return unless str.sub!(/\A((?:gmt|utc?)?[-+]\d+(?:[,.:]\d+(?::\d+)?)? - |[[:alpha:].\s]+(?:standard|daylight)\s+time\b - |[[:alpha:]]+(?:\s+dst)?\b + |[a-z.\s]+(?:standard|daylight)\s+time\b + |[a-z]+(?:\s+dst)?\b )/ix, '') val = $1 e.zone = val @@ -560,8 +560,8 @@ end else case c - when /\A[\s\v]/ - str.sub!(/\A[\s\v]+/, '') + when /\A\s/ + str.sub!(/\A\s+/, '') else return unless str.sub!(Regexp.new('\\A' + Regexp.quote(a)), '') end @@ -703,9 +703,9 @@ ( (?:gmt|utc?)?[-+]\d+(?:[,.:]\d+(?::\d+)?)? | - [[:alpha:].\s]+(?:standard|daylight)\stime\b + [a-z.\s]+(?:standard|daylight)\stime\b | - [[:alpha:]]+(?:\sdst)?\b + [a-z]+(?:\sdst)?\b ) )? /ix, @@ -1034,7 +1034,7 @@ e._comp = comp - str.gsub!(/[^-+',.\/:@[:alnum:]\[\]]+/, ' ') + str.gsub!(/[^-+',.\/:@0-9a-zA-Z\[\]]+/, ' ') _parse_time(str, e) # || _parse_beat(str, e) _parse_day(str, e) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/