From 3abc18c1b127e118208820f6604747b0bbb95eda Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 14 Feb 2009 22:03:28 +0000 Subject: * lib/time.rb (Time.parse): raise ArgumentError if Date._parse don't extract date information. [ruby-core:20912] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/test_time.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test') diff --git a/test/test_time.rb b/test/test_time.rb index 0d53409e9..844dc6231 100644 --- a/test/test_time.rb +++ b/test/test_time.rb @@ -176,6 +176,7 @@ class TestTimeExtention < Test::Unit::TestCase # :nodoc: #assert_equal(Time.local(2001,11,1), Time.parse("Nov", now)) assert_equal(Time.local( 2001,11,29,10,22), Time.parse( "10:22", now)) + assert_raise(ArgumentError) { Time.parse("foo", now) } end def test_invalid -- cgit