lib/deepstream/record.rb in deepstream-0.3.0 vs lib/deepstream/record.rb in deepstream-0.3.1

- old
+ new

@@ -60,10 +60,10 @@ @client.on_exception(e) end def method_missing(name, *args) name = name.to_s - return @data.fetch(name, nil) if args.empty? + return @data.fetch(@data.is_a?(Array) ? name.to_i : name, nil) if args.empty? return set(name[0..-2], *args) if name.end_with?('=') && !args.empty? raise(NoMethodError, name) end private