ruby-changes:65026
From: Nobuyoshi <ko1@a...>
Date: Sun, 24 Jan 2021 16:53:50 +0900 (JST)
Subject: [ruby-changes:65026] f3f1a666c7 (master): [ruby/rdoc] Shorten commit hashes
https://git.ruby-lang.org/ruby.git/commit/?id=f3f1a666c7 From f3f1a666c77f8c528b0adc9ccf78e4b9910bd6e0 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 21 Jan 2021 21:49:00 +0900 Subject: [ruby/rdoc] Shorten commit hashes https://github.com/ruby/rdoc/commit/5d3e153963 --- lib/rdoc/parser/changelog.rb | 2 +- test/rdoc/test_rdoc_parser_changelog.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rdoc/parser/changelog.rb b/lib/rdoc/parser/changelog.rb index eca4b56..d0701a6 100644 --- a/lib/rdoc/parser/changelog.rb +++ b/lib/rdoc/parser/changelog.rb @@ -211,7 +211,7 @@ class RDoc::Parser::ChangeLog < RDoc::Parser https://github.com/ruby/ruby/blob/trunk/lib/rdoc/parser/changelog.rb#L211 def parse_entries entries = [] - @content.scan(/^commit\s+(\h+)\n *Author: *(.+)\n *Date: *(.+)\n\n((?: {4}.*\n+)*)/) do + @content.scan(/^commit\s+(\h{20})\h*\n *Author: *(.+)\n *Date: *(.+)\n\n((?: {4}.*\n+)*)/) do entry_name, author, date, entry_body = $1, $2, $3, $4.gsub(/^ {4}/, '') if /(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+) *([-+]\d\d)(\d\d)/ =~ date time = Time.new($1, $2, $3, $4, $5, $6, "#{$7}:#{$8}") diff --git a/test/rdoc/test_rdoc_parser_changelog.rb b/test/rdoc/test_rdoc_parser_changelog.rb index 5f43811..e1fd459 100644 --- a/test/rdoc/test_rdoc_parser_changelog.rb +++ b/test/rdoc/test_rdoc_parser_changelog.rb @@ -280,7 +280,7 @@ commit\ 709bed2afaee50e2ce803f87bf1ee8291bea41e3 https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_parser_changelog.rb#L280 ChangeLog expected = [ - [ "709bed2afaee50e2ce803f87bf1ee8291bea41e3", + [ "709bed2afaee50e2ce80", [ "git <svn-admin@r...>", "2021-01-21 01:03:52 +0900", "* 2021-01-21 [ci skip]\n"]]] -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/