Skip to content

Commit a61412b

Browse files
committed
Improve conversion to regex by using eval(throwback) instead of Regexp.try_conver(throwback). The latter requires 'to_regexp' gem, while the former is vanilla Ruby.
1 parent a9f903a commit a61412b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app.rb

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def initialize
1010
@start_time = Time.now
1111
@released_torrents = get_torrent_releases
1212
@tracker_keywords = prepare_tracker_keywords
13-
@regexkeywords = convert_keywords_to_regex
13+
@regex_keywords = convert_keywords_to_regex
1414
@updated_matches = match_regex_and_torrents
1515
# update_tracker_timestamps
1616
# generate_updated_tracker_list
@@ -63,9 +63,8 @@ def convert_keywords_to_regex
6363
else
6464
throwback = "/" + builder + ".*" + last + ".*$" + "/i"
6565
end
66-
Regexp.try_convert(throwback)
66+
eval(throwback)
6767
end
68-
keywords
6968
end
7069

7170
def match_regex_and_torrents

0 commit comments

Comments
 (0)