From 85c05b53948a64ab0e246239d18e01d317a74d7d Mon Sep 17 00:00:00 2001 From: Manfred Stienstra Date: Sun, 21 Sep 2008 17:30:45 +0200 Subject: Add tests for u_unpack to make sure it raises an EncodingError on invalid UTF-8 strings. --- activesupport/lib/active_support/multibyte/chars.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/multibyte/chars.rb') diff --git a/activesupport/lib/active_support/multibyte/chars.rb b/activesupport/lib/active_support/multibyte/chars.rb index b3fdcdc650..5184026c63 100644 --- a/activesupport/lib/active_support/multibyte/chars.rb +++ b/activesupport/lib/active_support/multibyte/chars.rb @@ -446,7 +446,7 @@ module ActiveSupport #:nodoc: begin string.unpack 'U*' rescue ArgumentError - raise EncodingError.new('malformed UTF-8 character') + raise EncodingError, 'malformed UTF-8 character' end end -- cgit v1.2.3