summaryrefslogtreecommitdiff
path: root/ext/psych/parser.c
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2009-09-26 23:45:42 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2009-09-26 23:45:42 -0700
commit70467fb3e4611559138d016e61e0388ae1c52a56 (patch)
tree71975e8d71e151d3f21029944adb44c5b286a85e /ext/psych/parser.c
parenta59a8c0fc75f6c0339facdd90302eb352e9d8ea6 (diff)
downloadpsych-70467fb3e4611559138d016e61e0388ae1c52a56.zip
scalar supports anchors
Diffstat (limited to 'ext/psych/parser.c')
-rw-r--r--ext/psych/parser.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/psych/parser.c b/ext/psych/parser.c
index 6fd6cb4..1503520 100644
--- a/ext/psych/parser.c
+++ b/ext/psych/parser.c
@@ -79,11 +79,15 @@ static VALUE parse_string(VALUE self, VALUE string)
(long)event.data.scalar.length
);
+ VALUE anchor = event.data.scalar.anchor ?
+ rb_str_new2((const char *)event.data.scalar.anchor) :
+ Qnil;
+
VALUE tag = event.data.scalar.tag ?
rb_str_new2((const char *)event.data.scalar.tag) :
Qnil;
- rb_funcall(handler, rb_intern("scalar"), 2, tag, val);
+ rb_funcall(handler, rb_intern("scalar"), 3, val, anchor, tag);
}
break;
case YAML_STREAM_END_EVENT: