summaryrefslogtreecommitdiff
path: root/test/date
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2016-09-30 20:38:23 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-08-12 20:41:11 +0900
commitd96feee37c2d109d0103f08985e85641a23108bf (patch)
tree36f18fafde299f291a178a23185602f520f60ece /test/date
parente6a0a954c9ef5170b8b25088455106b3748c2187 (diff)
date_parse.c: avoid copying
* ext/date/date_parse.c (date_zone_to_diff): get rid of copying the whole argument string.
Diffstat (limited to 'test/date')
-rw-r--r--test/date/test_date_strptime.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/date/test_date_strptime.rb b/test/date/test_date_strptime.rb
index bf3002a24a..bbc0da5ac0 100644
--- a/test/date/test_date_strptime.rb
+++ b/test/date/test_date_strptime.rb
@@ -178,7 +178,8 @@ class TestDateStrptime < Test::Unit::TestCase
[['11:33:44 PM AMT', '%I:%M:%S %p %Z'], [nil,nil,nil,23,33,44,'AMT',nil,nil], __LINE__],
[['11:33:44 P.M. AMT', '%I:%M:%S %p %Z'], [nil,nil,nil,23,33,44,'AMT',nil,nil], __LINE__],
- [['fri1feb034pm+5', '%a%d%b%y%H%p%Z'], [2003,2,1,16,nil,nil,'+5',5*3600,5]]
+ [['fri1feb034pm+5', '%a%d%b%y%H%p%Z'], [2003,2,1,16,nil,nil,'+5',5*3600,5]],
+ [['E. Australia Standard Time', '%Z'], [nil,nil,nil,nil,nil,nil,'E. Australia Standard Time',10*3600,nil], __LINE__],
].each do |x, y|
h = Date._strptime(*x)
a = h.values_at(:year,:mon,:mday,:hour,:min,:sec,:zone,:offset,:wday)