Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
Breakpoint 1, rubinius::Dir::open (this=0x384f4e4, state=0x1807c00, path=0x389d2f4) at builtin_dir.cpp:24 24 DIR* d = opendir(path->byte_address(state)); (gdb) n 26 if(!d) state->raise_from_errno("Unable to open directory"); (gdb) n 27 SET(this, data, MemoryPointer::create(state, d)); (gdb) 29 return Qnil; (gdb) p this $1 = (rubinius::Dir * const) 0x384f4e4 (gdb) p *this $2 = { <rubinius::Object> = { <rubinius::ObjectHeader> = { { { obj_type = rubinius::DirType, zone = rubinius::MatureObjectZone, age = 0, Forwarded = 0, Remember = 0, Marked = 0, ForeverYoung = 0, CanStoreIvars = 1, StoresBytes = 0, RequiresCleanup = 0, IsBlockContext = 0, IsMeta = 0, CTXFast = 0, IsTainted = 0, IsFrozen = 0, IsLittleEndian = 0, RefsAreWeak = 0 }, all_flags = 32880 }, field_count = 2, klass = 0x3838d94 }, members of rubinius::Object: { field = 0x384f4f0, bytes = 0x384f4f0 "\016" } }, members of rubinius::Dir: static fields = 2, static type = <optimized out>, __ivars__ = 0xe, data = 0x38a6484 } (gdb) p *this->pointer There is no member or method named pointer. (gdb) p *this->data $3 = { <rubinius::Object> = { <rubinius::ObjectHeader> = { { { obj_type = rubinius::MemPtrType, zone = rubinius::MatureObjectZone, age = 0, Forwarded = 0, Remember = 0, Marked = 0, ForeverYoung = 0, CanStoreIvars = 1, StoresBytes = 1, RequiresCleanup = 0, IsBlockContext = 0, IsMeta = 0, CTXFast = 0, IsTainted = 0, IsFrozen = 0, IsLittleEndian = 0, RefsAreWeak = 0 }, all_flags = 98386 }, field_count = 5, klass = 0x381f034 }, members of rubinius::Object: { field = 0x38a6490, bytes = 0x38a6490 "ˬ\003" } }, members of rubinius::MemoryPointer: static fields = 0, static type = <optimized out>, pointer = 0x38aa8c0 }
This paste will be private.
From the Design Piracy series on my blog: