url: fix ancient syntax master github/master
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sat, 22 Mar 2025 19:23:51 +0000 (20:23 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sat, 22 Mar 2025 19:23:51 +0000 (20:23 +0100)
Regexp.new does not support three-argument constructors since Ruby 2.4

data/rbot/plugins/url.rb

index a110458..559a0f5 100644 (file)
@@ -9,7 +9,7 @@
 
 class UrlPlugin < Plugin
   LINK_INFO = "[Link Info]"
-  OUR_UNSAFE = Regexp.new("[^#{URI::PATTERN::UNRESERVED}#{URI::PATTERN::RESERVED}%# ]", false, 'N')
+  OUR_UNSAFE = Regexp.new("[^#{URI::PATTERN::UNRESERVED}#{URI::PATTERN::RESERVED}%# ]", false)
 
   Config.register Config::IntegerValue.new('url.max_urls',
     :default => 100, :validate => Proc.new{|v| v > 0},