summaryrefslogtreecommitdiff
path: root/lib/rexml/encodings/UTF-8.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rexml/encodings/UTF-8.rb')
-rw-r--r--lib/rexml/encodings/UTF-8.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/rexml/encodings/UTF-8.rb b/lib/rexml/encodings/UTF-8.rb
index 33a7e490c4..bb08f44100 100644
--- a/lib/rexml/encodings/UTF-8.rb
+++ b/lib/rexml/encodings/UTF-8.rb
@@ -1,13 +1,18 @@
module REXML
module Encoding
- @@__REXML_encoding_methods =<<-EOL
- def encode content
+ def encode_utf8 content
content
end
- def decode(str)
+ def decode_utf8(str)
str
end
- EOL
+
+ register(UTF_8) do |obj|
+ class << obj
+ alias decode decode_utf8
+ alias encode encode_utf8
+ end
+ end
end
end