fixed read length error for variable length arrays
Merge pull request #19 from jvranish/ruby

fixed read length error for variable length arrays