From 5396d8a1ab52b4da4f5199109472fe7f8ea43085 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 23 Mar 2016 11:57:01 +0000 Subject: strftime.c: format in String * strftime.c (rb_strftime_with_timespec): append formatted results to the given string with expanding, and also deal with NUL chars. * strftime.c (rb_strftime, rb_strftime_timespec): return formatted string, not the length put in the given buffer. * time.c (rb_strftime_alloc): no longer needs to retry with reallocating buffers. * time.c (time_strftime): no longer needs to split by NUL chars. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_time.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test/ruby/test_time.rb') diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb index 232d3472c4..71f2756216 100644 --- a/test/ruby/test_time.rb +++ b/test/ruby/test_time.rb @@ -810,8 +810,7 @@ class TestTime < Test::Unit::TestCase end def test_strftime_too_wide - bug4457 = '[ruby-dev:43285]' - assert_raise(Errno::ERANGE, bug4457) {Time.now.strftime('%8192z')} + assert_equal(8192, Time.now.strftime('%8192z').size) end def test_strfimte_zoneoffset -- cgit v1.2.3