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:
parent
88083fa47e
commit
b38b57cb54
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue