Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- misutowolf@blomkvist:~/Projects/freeman/lib$ irb -I .
- 2.0.0-p247 :001 > load 'source_buffer.rb'
- => true
- 2.0.0-p247 :002 > buf = SourceBuffer.new
- => #<SourceBuffer:0x00000002ba6d80>
- 2.0.0-p247 :003 > buf.set("Hello\0World\0")
- => 0
- 2.0.0-p247 :004 > buf.get_string
- => ""
- 2.0.0-p247 :005 > buf.get_string
- => ""
- 2.0.0-p247 :006 > buf.buffer
- => "Hello\x00World\x00"
Advertisement
Add Comment
Please, Sign In to add comment