From 3c73f44c7f779fe9eea823457c4f288aa21d3c32 Mon Sep 17 00:00:00 2001 From: tenderlove Date: Mon, 22 Oct 2012 21:25:02 +0000 Subject: * 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 --- ext/psych/lib/psych/syntax_error.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ext/psych/lib/psych') diff --git a/ext/psych/lib/psych/syntax_error.rb b/ext/psych/lib/psych/syntax_error.rb index f79743dba4..f972256f9e 100644 --- a/ext/psych/lib/psych/syntax_error.rb +++ b/ext/psych/lib/psych/syntax_error.rb @@ -1,5 +1,8 @@ module Psych - class SyntaxError < ::SyntaxError + class Error < RuntimeError + end + + class SyntaxError < Error attr_reader :file, :line, :column, :offset, :problem, :context def initialize file, line, col, offset, problem, context -- cgit v1.2.3