lib/sugar-high/regexp.rb in sugar-high-0.6.3 vs lib/sugar-high/regexp.rb in sugar-high-0.7.0
- old
+ new
@@ -1,23 +1,23 @@
-class String
+class String
def to_regexp
/#{Regexp.escape(self)}/
end
end
class Regexp
def to_regexp
self
- end
+ end
end
class MatchData
def offset_after
offset(0)[1] +1
end
def offset_before
- offset(0)[0] -1
+ offset(0)[0] -1
end
end
class Array
def grep_it expr
\ No newline at end of file