summaryrefslogtreecommitdiff
path: root/ext/psych/lib/psych/class_loader.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/psych/lib/psych/class_loader.rb')
-rw-r--r--ext/psych/lib/psych/class_loader.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/psych/lib/psych/class_loader.rb b/ext/psych/lib/psych/class_loader.rb
index a5d1a7a4a9..50efc35ee2 100644
--- a/ext/psych/lib/psych/class_loader.rb
+++ b/ext/psych/lib/psych/class_loader.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-require 'psych/omap'
-require 'psych/set'
+require_relative 'omap'
+require_relative 'set'
module Psych
class ClassLoader # :nodoc:
@@ -35,7 +35,7 @@ module Psych
constants.each do |const|
konst = const_get const
- class_eval <<~RUBY
+ class_eval <<~RUBY, __FILE__, __LINE__ + 1
def #{const.to_s.downcase}
load #{konst.inspect}
end
@@ -86,7 +86,7 @@ module Psych
if @symbols.include? sym
super
else
- raise DisallowedClass, 'Symbol'
+ raise DisallowedClass.new('load', 'Symbol')
end
end
@@ -96,7 +96,7 @@ module Psych
if @classes.include? klassname
super
else
- raise DisallowedClass, klassname
+ raise DisallowedClass.new('load', klassname)
end
end
end