aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/multibyte/chars.rb
diff options
context:
space:
mode:
authorManfred Stienstra <manfred@fngtps.com>2008-09-21 17:30:45 +0200
committerManfred Stienstra <manfred@fngtps.com>2008-09-21 17:30:45 +0200
commit85c05b53948a64ab0e246239d18e01d317a74d7d (patch)
tree1c8e0d22c75da35c46a51a0c24a125428fd1a83d /activesupport/lib/active_support/multibyte/chars.rb
parent52f8c04e1e0f2e6610e54b00125179ec9dacbcd5 (diff)
downloadrails-85c05b53948a64ab0e246239d18e01d317a74d7d.tar.gz
rails-85c05b53948a64ab0e246239d18e01d317a74d7d.tar.bz2
rails-85c05b53948a64ab0e246239d18e01d317a74d7d.zip
Add tests for u_unpack to make sure it raises an EncodingError on invalid UTF-8 strings.
Diffstat (limited to 'activesupport/lib/active_support/multibyte/chars.rb')
-rw-r--r--activesupport/lib/active_support/multibyte/chars.rb2
1 files changed, 1 insertions, 1 deletions
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