# File lib/safe_yaml.rb, line 81 def predefined_tags if @predefined_tags.nil? @predefined_tags = {} if YAML_ENGINE == "syck" YAML.tagged_classes.each do |tag, klass| @predefined_tags[klass] = tag end else # Special tags appear to be hard-coded in Psych: # https://github.com/tenderlove/psych/blob/v1.3.4/lib/psych/visitors/to_ruby.rb # Fortunately, there aren't many that SafeYAML doesn't already support. @predefined_tags.merge!({ Exception => "!ruby/exception", Range => "!ruby/range", Regexp => "!ruby/regexp", }) end end @predefined_tags end