lib/demisyn.rb in demisyn-0.1.0 vs lib/demisyn.rb in demisyn-0.2.0
- old
+ new
@@ -7,30 +7,30 @@
major.to_i.>=(2) && minor.to_i.>=(3)
end
end
refine String do
+ def ~()
+ eval gsub(/ /, ".")
+ end
+
case Demisyn.send :lonely_operator?
when true
- def ~()
+ def -@
eval gsub(/ /, "&.")
end
- when false
- def ~()
- eval gsub(/ /, ".") rescue nil
- end
- end
+ end
end
refine Array do
+ def ~()
+ eval join(".")
+ end
+
case Demisyn.send :lonely_operator?
when true
- def ~()
+ def -@
eval join("&.")
- end
- when false
- def ~()
- eval join(".") rescue nil
end
end
end
end