lib/acfs/location.rb in acfs-1.4.0 vs lib/acfs/location.rb in acfs-1.5.0

- old
+ new

@@ -47,11 +47,11 @@ private def extract_arg(key, hashes) hashes.each_with_index do |hash, index| if hash.key?(key) - return (index == 0 ? hash.delete(key) : hash.fetch(key)) + return (index.zero? ? hash.delete(key) : hash.fetch(key)) end end nil end @@ -70,12 +70,12 @@ def get_replacement(sym, args) args.fetch(sym.to_s) do args.fetch(sym) do if args[:raise].nil? || args[:raise] raise ArgumentError.new "URI path argument `#{sym}' missing on `#{self}'. Given: `#{args}.inspect'" - else - ":#{sym}" end + + ":#{sym}" end end end end end