summaryrefslogtreecommitdiff
path: root/lib/psych/syntax_error.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-04-05 10:58:01 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-04-05 10:58:01 -0700
commit803653a94027596864d8776e64807906fd44bb68 (patch)
tree5ae1e412b9061c967276624521f867df94d1b78f /lib/psych/syntax_error.rb
parent0c82d6d009eceb2bac048c2262f68c1fc494dde9 (diff)
downloadpsych-803653a94027596864d8776e64807906fd44bb68.tar.gz
* ext/psych/lib/psych/exception.rb: there should be only one exception
base class. Fixes tenderlove/psych #125 * ext/psych/lib/psych.rb: require the correct exception class * ext/psych/lib/psych/syntax_error.rb: ditto * ext/psych/lib/psych/visitors/to_ruby.rb: ditto fixes #125
Diffstat (limited to 'lib/psych/syntax_error.rb')
-rw-r--r--lib/psych/syntax_error.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/psych/syntax_error.rb b/lib/psych/syntax_error.rb
index f972256..e200ef0 100644
--- a/lib/psych/syntax_error.rb
+++ b/lib/psych/syntax_error.rb
@@ -1,8 +1,7 @@
-module Psych
- class Error < RuntimeError
- end
+require 'psych/exception'
- class SyntaxError < Error
+module Psych
+ class SyntaxError < Psych::Exception
attr_reader :file, :line, :column, :offset, :problem, :context
def initialize file, line, col, offset, problem, context