From b38b57cb5434746899d16556f148026430353b36 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 5 Sep 2015 03:58:07 +0000 Subject: [PATCH] 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rss/rss.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rss/rss.rb b/lib/rss/rss.rb index 224b576154..dbea3b5344 100644 --- a/lib/rss/rss.rb +++ b/lib/rss/rss.rb @@ -53,7 +53,7 @@ class Time 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