lib/codec.rb in scale_rb-0.1.2 vs lib/codec.rb in scale_rb-0.1.3

- old
+ new

@@ -312,10 +312,10 @@ items = type_def[:_enum] raise IndexOutOfRangeError, "type: #{type_def}" if index > items.length - 1 item = items.to_a[index] # 'name' or [:name, inner_type] debug 'value', item.inspect - return [item, remaining_bytes] if item.instance_of?(String) + return [item, bytes[1..]] if item.instance_of?(String) value, remaining_bytes = decode(item[1], bytes[1..], registry) [ { item[0].to_sym => value }, remaining_bytes