lib/muflax/regex.rb in muflax-0.3.0 vs lib/muflax/regex.rb in muflax-0.3.1
- old
+ new
@@ -10,16 +10,20 @@
str.mgsub! replacements
str
end
alias :gsub_all :mgsub
-
+
def mgsub! replacements={}
replacements.each do |a, b|
self.gsub! a, b
end
self
end
alias :gsub_all! :mgsub!
-end
+ # ruby 2.3 compat
+ def match?(string, pos = 0)
+ !!match(string, pos)
+ end unless //.respond_to?(:match?)
+end