aboutsummaryrefslogtreecommitdiffstats
path: root/ext/psych/parser.c
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-22 21:25:02 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-22 21:25:02 +0000
commit3c73f44c7f779fe9eea823457c4f288aa21d3c32 (patch)
treedd8b7e9af8979d1738d10ecc4ddde5d5270a9638 /ext/psych/parser.c
parent6c6d4568e8b8c8667c0b57ca6e1b5ba5d7acbbe3 (diff)
downloadruby-3c73f44c7f779fe9eea823457c4f288aa21d3c32.tar.gz
* ext/psych/parser.c: just get the constant defined in Ruby.
* ext/psych/lib/psych/syntax_error.rb: Psych::SyntaxError now inherits from StandardError rather than SyntaxError. Thanks Eric Hodel! * test/psych/test_exception.rb: tests for change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/psych/parser.c')
-rw-r--r--ext/psych/parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/psych/parser.c b/ext/psych/parser.c
index 0908a1b49f..8c65ce1307 100644
--- a/ext/psych/parser.c
+++ b/ext/psych/parser.c
@@ -557,7 +557,7 @@ void Init_psych_parser()
rb_define_const(cPsychParser, "UTF16BE", INT2NUM(YAML_UTF16BE_ENCODING));
rb_require("psych/syntax_error");
- ePsychSyntaxError = rb_define_class_under(mPsych, "SyntaxError", rb_eSyntaxError);
+ ePsychSyntaxError = rb_const_get(mPsych, rb_intern("SyntaxError"));
rb_define_method(cPsychParser, "parse", parse, -1);
rb_define_method(cPsychParser, "mark", mark, 0);