From f99f9a199eee2a77c585db2948a763d6e9608e2d Mon Sep 17 00:00:00 2001 From: Bohung Date: Sun, 22 Aug 2021 16:08:34 +0800 Subject: [PATCH] Fix bug. --- seminar.gemspec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/seminar.gemspec b/seminar.gemspec index da941d4..ce46ac5 100644 --- a/seminar.gemspec +++ b/seminar.gemspec @@ -1,9 +1,13 @@ # -*- encoding: utf-8 -*- # stub: seminar 0.0.1 ruby lib -require "yaml" -require "erb" -data = File.open(File.join(File.dirname(__FILE__), 'config', 'list.yml')).read -$seminar_list = YAML.safe_load(ERB.new(data).result(binding)) +begin + require "yaml" + require "erb" + data = File.open(File.join(File.dirname(__FILE__), 'config', 'list.yml')).read + $seminar_list = YAML.safe_load(ERB.new(data).result(binding)).map{|k,v| [k.to_sym,v]}.to_h +rescue => e + puts [e.to_s,e.backtrace] +end Gem::Specification.new do |s| s.name = "seminar" s.version = "0.0.1"