aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rexml/encodings/US-ASCII.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rexml/encodings/US-ASCII.rb')
-rw-r--r--lib/rexml/encodings/US-ASCII.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rexml/encodings/US-ASCII.rb b/lib/rexml/encodings/US-ASCII.rb
index 4ca2c82a83..0cb9afd147 100644
--- a/lib/rexml/encodings/US-ASCII.rb
+++ b/lib/rexml/encodings/US-ASCII.rb
@@ -1,7 +1,7 @@
module REXML
module Encoding
# Convert from UTF-8
- def to_us_ascii content
+ def encode content
array_utf8 = content.unpack('U*')
array_enc = []
array_utf8.each do |num|
@@ -16,7 +16,7 @@ module REXML
end
# Convert to UTF-8
- def from_us_ascii(str)
+ def decode(str)
str.unpack('C*').pack('U*')
end
end