ruby-changes:39686
From: nobu <ko1@a...>
Date: Sat, 5 Sep 2015 12:58:16 +0900 (JST)
Subject: [ruby-changes:39686] nobu:r51767 (trunk): rss.rb: don't substitute, just search
nobu 2015-09-05 12:58:07 +0900 (Sat, 05 Sep 2015) New Revision: 51767 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51767 Log: rss.rb: don't substitute, just search * lib/rss/rss.rb (Time#w3cdtf): don't substitute, just search zeros at EOS. [ruby-core:70667] [Bug #11509] Modified files: trunk/lib/rss/rss.rb Index: lib/rss/rss.rb =================================================================== --- lib/rss/rss.rb (revision 51766) +++ lib/rss/rss.rb (revision 51767) @@ -53,7 +53,7 @@ class Time https://github.com/ruby/ruby/blob/trunk/lib/rss/rss.rb#L53 if usec.zero? fraction_digits = 0 else - fraction_digits = strftime('%6N').sub!(/0*\z/, '').size + fraction_digits = strftime('%6N').index(/0*\z/) end xmlschema(fraction_digits) end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/