diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-07 14:40:07 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-07 14:40:07 +0000 |
commit | 4a5a6f4a2c6a20fb61ab834655fdae8ba4879196 (patch) | |
tree | e18fe99e6a2e828026bc38d6e952605509ffebcf /test/ruby | |
parent | 86411a0a761976b6d4ec9d0d841e727f17495c78 (diff) |
merge revision(s) 32885:
* time.c (rb_strftime_alloc): raise ERANGE if width is too large.
Patch by Nobuyoshi Nakada. [Bug #4457] [ruby-dev:43285]
* test/ruby/test_time.rb (class TestTime): add a test for the
above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_time.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb index aea4c2edc0..0e61f32ab0 100644 --- a/test/ruby/test_time.rb +++ b/test/ruby/test_time.rb @@ -649,6 +649,9 @@ class TestTime < Test::Unit::TestCase # [ruby-core:33985] assert_equal("3000000000", Time.at(3000000000).strftime('%s')) + + bug4457 = '[ruby-dev:43285]' + assert_raise(Errno::ERANGE, bug4457) {Time.now.strftime('%8192z')} end def test_delegate |