Permalink
Browse files

all events handled

  • Loading branch information...
1 parent 7940aeb commit 46ffb85fe466efd9dbcac74612efeb4fbd89d96d @tenderlove tenderlove committed Sep 27, 2009
Showing with 9 additions and 0 deletions.
  1. +3 −0 ext/psych/parser.c
  2. +6 −0 lib/psych/parser/handler.rb
View
@@ -143,6 +143,9 @@ static VALUE parse_string(VALUE self, VALUE string)
case YAML_MAPPING_END_EVENT:
rb_funcall(handler, rb_intern("end_mapping"), 0);
break;
+ case YAML_NO_EVENT:
+ rb_funcall(handler, rb_intern("empty"), 0);
+ break;
case YAML_STREAM_END_EVENT:
rb_funcall(handler, rb_intern("end_stream"), 0);
done = 1;
@@ -51,6 +51,12 @@ def end_mapping
end
###
+ # Called when an empty event happens. (Which, as far as I can tell, is
+ # never).
+ def empty
+ end
+
+ ###
# Called when the YAML stream ends
def end_stream
end

0 comments on commit 46ffb85

Please sign in to comment.