-
Notifications
You must be signed in to change notification settings - Fork 440
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed parsing of FFI's libffi ChangeLog
Time.parse doesn't handle arbitrary input well. This caused a bug when it couldn't figure out the format of the time properly. Now we fall back to splitting on two spaces to find the time when Time raises a NoMethodError. Fixes #165
- Loading branch information
Showing
3 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,7 +182,9 @@ def test_group_entries | |
[ 'Tue Dec 4 08:32:10 2012 Eric Hodel <[email protected]>', | ||
%w[three four]], | ||
[ 'Mon Dec 3 20:28:02 2012 Koichi Sasada <[email protected]>', | ||
%w[five six]]] | ||
%w[five six]], | ||
[ '2008-01-30 H.J. Lu <[email protected]>', | ||
%w[seven eight]]] | ||
|
||
expected = { | ||
'2012-12-04' => [ | ||
|
@@ -193,6 +195,9 @@ def test_group_entries | |
'2012-12-03' => [ | ||
['Mon Dec 3 20:28:02 2012 Koichi Sasada <[email protected]>', | ||
%w[five six]]], | ||
'2008-01-30' => [ | ||
['2008-01-30 H.J. Lu <[email protected]>', | ||
%w[seven eight]]], | ||
} | ||
|
||
assert_equal expected, parser.group_entries(entries) | ||
|
@@ -226,6 +231,25 @@ def test_parse_entries | |
assert_equal expected, parser.parse_entries | ||
end | ||
|
||
def test_parse_entries_bad_time | ||
parser = util_parser <<-ChangeLog | ||
2008-01-30 H.J. Lu <[email protected]> | ||
PR libffi/34612 | ||
* src/x86/sysv.S (ffi_closure_SYSV): Pop 4 byte from stack when | ||
returning struct. | ||
ChangeLog | ||
|
||
expected = [ | ||
[ '2008-01-30 H.J. Lu <[email protected]>', | ||
[ 'src/x86/sysv.S (ffi_closure_SYSV): Pop 4 byte from stack when ' + | ||
'returning struct.']] | ||
] | ||
|
||
assert_equal expected, parser.parse_entries | ||
end | ||
|
||
def test_parse_entries_gnu | ||
parser = util_parser <<-ChangeLog | ||
1998-08-17 Richard Stallman <[email protected]> | ||
|