lib/srsly.rb in srsly-1.0.0 vs lib/srsly.rb in srsly-1.0.1
- old
+ new
@@ -68,10 +68,10 @@
else
raise ArgumentError, "Invalid :error"
end if error
resps = options.select { |k, v| k.is_a?(Regexp) || k.is_a?(String) || k.nil? }
- resps = resps.merge(
+ resps = Hash[resps].merge(
# Default responses if nothing given
/^y/i => true,
/^n/i => false) if resps.reject { |k, _| k.nil? }.empty?
ask = proc { write.call message }