<znz_v>
biff: [ruby-changes:27266] drbrain:r39318 (ruby_2_0_0): * lib/rdoc.rb: Update to release version of 4.0.0 - http://mla.n-z.jp/?ruby-changes=27266
lopex has quit [Read error: Operation timed out]
Guest85414 has quit [Read error: Operation timed out]
judofyr has quit [Remote host closed the connection]
davidbalber|away is now known as davidbalbert
marcandr_ has joined #ruby-core
_br_ has quit [Excess Flood]
_br_ has joined #ruby-core
_br_ has quit [Excess Flood]
_br_ has joined #ruby-core
idkazuma has quit [Remote host closed the connection]
schaerli has joined #ruby-core
schaerli has quit [Remote host closed the connection]
<zzak>
that eregon
<zzak>
eregon: thanks!
__BigO__ has quit [Remote host closed the connection]
__BigO__ has joined #ruby-core
davidbalbert is now known as davidbalber|away
wudofyr_ has quit [Ping timeout: 276 seconds]
wudofyr_ has joined #ruby-core
davidbalber|away is now known as davidbalbert
kosaki2 has joined #ruby-core
kosaki2 has quit [Remote host closed the connection]
kosaki has joined #ruby-core
davidbalbert is now known as davidbalber|away
kosaki2 has joined #ruby-core
davidbalber|away is now known as davidbalbert
halogenandtoast has joined #ruby-core
<halogenandtoast>
The Data class is undocumented, I'm considering adding documentation to prevent confusion about it, but I can't determine from it's usage what it's actually meant to be, does anyone here happen to know why it exists?
<lopex>
internal usage, most notably under Error class
<halogenandtoast>
Which seems to subclass, but I'm not certain as to what reason you'd subclass it.
<halogenandtoast>
I meant 1 reference in error.c
<halogenandtoast>
I've found it in various other places, both in core and std-lib
<lopex>
StringIO does
<lopex>
well, no idea, it has allocator undefined
<lopex>
I guess it can be a remnant of some sort
<halogenandtoast>
It hasn't changed much since 1.0-961225
<halogenandtoast>
I didn't see it in 0.46
<lopex>
yep, the most heinous usage is under Error class, I remember implementing that in jruby
<halogenandtoast>
*0.49
<lopex>
halogenandtoast: rb_define_class_under defineds constant under given class
<lopex>
not inheritance
<lopex>
it's just non-lookupable "message" name
<lopex>
since it's lower case
vondruch has quit [Ping timeout: 244 seconds]
<halogenandtoast>
You are correct/
<halogenandtoast>
Which also seems peculiar.
<lopex>
it is
<drbrain>
the Data class can be used by Data_Wrap_Struct/Data_Make_Struct
<halogenandtoast>
What's also odd is curses, icon, raddrinfo, stringio, tcltklib, win32ole and I'm not sure they ever needed to use it.
<drbrain>
it's designed to represent a C pointer
<drbrain>
unlike Object, Data has no alloc
<halogenandtoast>
Is it a C pointer to a VALUE or just a general C pointer?
<drbrain>
you can't alloc any of those objects without going through Data_Wrap_Struct/Data_Make_Struct (custom ::new method)
<drbrain>
general C pointer
<halogenandtoast>
drbrain: What's the actual use case then?
<drbrain>
halogenandtoast: you don't have to undef_alloc_func() yourself
<halogenandtoast>
Okay awesome, do you think it's worth documenting this somewhere?
<drbrain>
halogenandtoast: I think in README.EXT
__BigO__ has quit [Remote host closed the connection]
<drbrain>
or, the Data class should say something like "this is a recommended base class for use by C extensions using Data_Make_Struct/Data_Wrap_Struct, see README.EXT for details"
<halogenandtoast>
Oh it is in there. Interesting!
<drbrain>
Data vs DATA can get confusing
__BigO__ has joined #ruby-core
<halogenandtoast>
Yeah
<halogenandtoast>
lopex drbrain: thank you both for your help. I'll try and figure out how to write this documentation tonight.
<drbrain>
awesome
<halogenandtoast>
I've been wanting a good way to get a patch into ruby.
<drbrain>
it's the easiest way, for sure!
agarie has joined #ruby-core
<zzak>
:D
vondruch has joined #ruby-core
<lopex>
btw, that NameError::message is accessible via ObjectSpace of course, which defeats the purpose
<halogenandtoast>
lopex: How would you reach that via ObjectSpace?
<drbrain>
I don't think the message is supposed to be hidden from ObjectSpace
<lopex>
begin;foo;rescue NameError => e;end; ObjectSpace.each_object{|o| p o if o.is_a? Data}
<lopex>
I guess nothing that's allocated and gc-ed can
<lopex>
oh, actually
davidbalbert is now known as davidbalber|away
<lopex>
oh FL_SINGLETON are skipped
<lopex>
T_SCOPE is kindof obvious to hide
davidbalber|away is now known as davidbalbert
<lopex>
if (!p->as.basic.klass) continue; -- I forgot what this case
<lopex>
basic was the non-union part right ?
__BigO__ has quit [Remote host closed the connection]
__BigO__ has joined #ruby-core
nokada_ has joined #ruby-core
nokada has quit [Read error: Connection reset by peer]
idkazuma has joined #ruby-core
halogenandtoast has quit [Quit: halogenandtoast]
xibbar has joined #ruby-core
nokada_ has quit [Read error: Connection reset by peer]
nokada has joined #ruby-core
<znz_v>
biff: [ruby-changes:27272] drbrain:r39324 (trunk): * lib/rubygems/installer.rb: Use gsub instead of gsub! to avoid - http://mla.n-z.jp/?ruby-changes=27272
marcandr_ has quit [Remote host closed the connection]
marcandre has quit [Remote host closed the connection]