lib/qipowl/core/monkeypatches.rb in qipowl-0.9.0 vs lib/qipowl/core/monkeypatches.rb in qipowl-0.9.1
- old
+ new
@@ -1,7 +1,8 @@
# encoding: utf-8
+require_relative '../utils/unicode_strings'
require_relative '../utils/hash_recursive_merge'
module Qipowl
class ::Object
def is_one_of? *classes
@@ -112,14 +113,14 @@
end
def carriage!
self.gsub!(/\R/, " #{CARRIAGE_RETURN} ")
end
def uncarriage
- self.gsub(/ #{CARRIAGE_RETURN} /, %Q(
+ self.gsub(/\s?#{CARRIAGE_RETURN}\s?/, %Q(
))
end
def uncarriage!
- self.gsub!(/ #{CARRIAGE_RETURN} /, %Q(
+ self.gsub!(/\s?#{CARRIAGE_RETURN}\s?/, %Q(
))
end
def un␚ify
self.gsub(/␚(.*?)␚/, '')