Skip to content
Browse files

make time_for always raise an ArgumentError if something goes wrong

Conflicts:

	test/helpers_test.rb
  • Loading branch information...
1 parent 3c2d92c commit f467587016510ecf5b02e032310a495ea9b138b1 @rkh rkh committed Apr 13, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/sinatra/base.rb
View
2 lib/sinatra/base.rb
@@ -426,7 +426,7 @@ def time_for(value)
Time.parse value.to_s
end
rescue ArgumentError => boom
- raise boom.to_s
+ raise boom
rescue Exception
raise ArgumentError, "unable to convert #{value.inspect} to a Time object"
end

0 comments on commit f467587

Please sign in to comment.
Something went wrong with that request. Please try again.