summaryrefslogtreecommitdiff
path: root/ext/psych/lib/psych/visitors
diff options
context:
space:
mode:
Diffstat (limited to 'ext/psych/lib/psych/visitors')
-rw-r--r--ext/psych/lib/psych/visitors/to_ruby.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/psych/lib/psych/visitors/to_ruby.rb b/ext/psych/lib/psych/visitors/to_ruby.rb
index c061da25f1..fd1c8e6caf 100644
--- a/ext/psych/lib/psych/visitors/to_ruby.rb
+++ b/ext/psych/lib/psych/visitors/to_ruby.rb
@@ -70,11 +70,11 @@ module Psych
o.value
end
when '!ruby/object:BigDecimal'
- require 'bigdecimal'
+ require 'bigdecimal' unless defined? BigDecimal
class_loader.big_decimal._load o.value
when "!ruby/object:DateTime"
class_loader.date_time
- require 'date'
+ require 'date' unless defined? DateTime
@ss.parse_time(o.value).to_datetime
when '!ruby/encoding'
::Encoding.find o.value