1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2015-09-05 03:58:07 +00:00
parent 88083fa47e
commit b38b57cb54

View file

@ -53,7 +53,7 @@ class Time
if usec.zero? if usec.zero?
fraction_digits = 0 fraction_digits = 0
else else
fraction_digits = strftime('%6N').sub!(/0*\z/, '').size fraction_digits = strftime('%6N').index(/0*\z/)
end end
xmlschema(fraction_digits) xmlschema(fraction_digits)
end end