mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merge revision(s) 51766,51767: [Backport #11509]
* lib/rss/rss.rb (Time#w3cdtf): fix zero-trimmed width of fraction digits. [ruby-core:70667] [Bug #11509] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@51987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a6268be70a
commit
3d6acf9d16
4 changed files with 13 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Sep 30 03:44:36 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/rss/rss.rb (Time#w3cdtf): fix zero-trimmed width of fraction
|
||||
digits. [ruby-core:70667] [Bug #11509]
|
||||
|
||||
Wed Sep 30 03:34:25 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* re.c (rb_memsearch_wchar, rb_memsearch_qchar): test matching
|
||||
|
|
|
@ -53,7 +53,7 @@ class Time
|
|||
if usec.zero?
|
||||
fraction_digits = 0
|
||||
else
|
||||
fraction_digits = Math.log10(usec.to_s.sub(/0*$/, '').to_i).floor + 1
|
||||
fraction_digits = strftime('%6N').index(/0*\z/)
|
||||
end
|
||||
xmlschema(fraction_digits)
|
||||
end
|
||||
|
|
|
@ -102,6 +102,12 @@ module RSS
|
|||
assert_textinput20(@textinput_info, rss.textinput)
|
||||
end
|
||||
|
||||
def test_time_w3cdtf
|
||||
assert_equal("2015-09-05T01:25:48.0001Z",
|
||||
Time.utc(2015, 9, 5, 1, 25, 48, 100).w3cdtf,
|
||||
'[ruby-core:70667] [Bug #11509]')
|
||||
end
|
||||
|
||||
private
|
||||
def setup_xml_declaration_info
|
||||
@version = "1.0"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#define RUBY_VERSION "2.2.4"
|
||||
#define RUBY_RELEASE_DATE "2015-09-30"
|
||||
#define RUBY_PATCHLEVEL 177
|
||||
#define RUBY_PATCHLEVEL 178
|
||||
|
||||
#define RUBY_RELEASE_YEAR 2015
|
||||
#define RUBY_RELEASE_MONTH 9
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue