lib/airborne/path_matcher.rb in airborne-0.0.16 vs lib/airborne/path_matcher.rb in airborne-0.0.17

- old
+ new

@@ -19,10 +19,10 @@ if /^[\d]+(\.[\d]+){0,1}$/ === part part = part.to_i json = json[part] else json = json[part.to_sym] - raise "Expected #{path} to be object or array got #{json.class} from JSON response" unless json.class == Array || json.class == Hash + raise "Expected #{path} to be object or array got #{json.class} from JSON response" unless json.class == Array || json.class == Hash || json.nil? end end if type == '*' json.each{|part| yield part} elsif type == '?'