Actions
Bug #13131
closedArgumentError: string contains null byte
Bug #13131:
ArgumentError: string contains null byte
Description
Why does this not work?:
IO.binwrite(0.chr, '/tmp/test.txt')
If it's not a bug, then please somebody explain - how strings containing null bytes can be written to disk?
say there's a thermal printer command [29, 49, 75, 2, 0, 49, 120].map(&:chr).join that needs to be part of data sent to print, how would this be accomplished in ruby?
Updated by Eregon (Benoit Daloze) almost 10 years ago
Updated by voobscout (voob scout) almost 10 years ago
Actions