summaryrefslogtreecommitdiff
path: root/ext/psych/lib/psych/parser.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/psych/lib/psych/parser.rb')
-rw-r--r--ext/psych/lib/psych/parser.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/psych/lib/psych/parser.rb b/ext/psych/lib/psych/parser.rb
index 5d75605d49..84085f1fb0 100644
--- a/ext/psych/lib/psych/parser.rb
+++ b/ext/psych/lib/psych/parser.rb
@@ -36,12 +36,16 @@ module Psych
# The handler on which events will be called
attr_accessor :handler
+ # Set the encoding for this parser to +encoding+
+ attr_writer :external_encoding
+
###
# Creates a new Psych::Parser instance with +handler+. YAML events will
# be called on +handler+. See Psych::Parser for more details.
def initialize handler = Handler.new
@handler = handler
+ @external_encoding = ANY
end
end
end