lib/Checked/Demand/Mods/File_Addresses.rb in Checked-0.1.1 vs lib/Checked/Demand/Mods/File_Addresses.rb in Checked-0.1.2
- old
+ new
@@ -36,9 +36,12 @@
def file_address!
self.target= target.strip
string!
not_empty!
+ if target[%r!([^a-zA-Z0-9\.\_\-\/~]+)!]
+ fail! "...has invalid characters: #{$1.inspect}"
+ end
end
def file_read!
self.target= target.gsub("\r\n", "\n")
end