diff --git a/event_news_mod.gemspec b/event_news_mod.gemspec index 2476c1a..a2bb8cf 100644 --- a/event_news_mod.gemspec +++ b/event_news_mod.gemspec @@ -27,7 +27,7 @@ if bundle_update_flag puts "Checking event_news widgets" widget_info = info["widgets"].sort_by{|h| h["filename"].to_i} rescue [] update_flag = false - last_index = widget_info[-1]["filename"].match(/\d+/)[0].to_i rescue nil + last_index = widget_info.collect{|v| v["filename"].to_s.scan(/\d+/).collect{|v1| v1.to_i}}.flatten.sort[-1] rescue nil if !last_index.nil? idx_regex = /^(\d+[\. \t]*)|[ \t]+$/ default_event_news_widget_info.each do |h|