Skip to content

Commit f51e469

Browse files
committed
#130 Check class of feedlink
1 parent 2b5cc79 commit f51e469

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

plugins/filter/google_news.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ def run
3434

3535
def rewrite_link(feed)
3636
if feed.link.index("http://news.google.com")
37-
matched = feed.link.match(/(&url=)/)
38-
unless matched.nil?
39-
new_link = matched.post_match
40-
feed.link = new_link unless new_link.nil?
37+
if feed.link.class == String
38+
matched = feed.link.match(/(&url=)/)
39+
unless matched.nil?
40+
new_link = matched.post_match
41+
feed.link = new_link unless new_link.nil?
42+
end
4143
end
4244
end
4345

0 commit comments

Comments
 (0)