hsbt_away changed the topic of #ruby-core to: check the latest release candidate for 1.9.1 release ftp.ruby-lang.org:/home/yugui/ruby-1.9.1-r26021+1.tar.bz2
kosaki2 has quit [Read error: Connection reset by peer]
kosaki2_ has joined #ruby-core
ZachBeta has joined #ruby-core
nari_ has joined #ruby-core
kosaki8 has quit [Ping timeout: 256 seconds]
ZachBeta has quit [Quit: Computer has gone to sleep.]
nari_ has quit [Ping timeout: 256 seconds]
nahiluhmot has joined #ruby-core
nokada_ has joined #ruby-core
n0kada-freenode has quit [Ping timeout: 258 seconds]
nokada has quit [Ping timeout: 264 seconds]
n0kada-freenode has joined #ruby-core
xibbar has quit [Remote host closed the connection]
nokada has joined #ruby-core
n0kada-freenode has quit [Ping timeout: 256 seconds]
nokada_ has quit [Ping timeout: 248 seconds]
nahiluhmot has quit [Remote host closed the connection]
hsbt has quit [Ping timeout: 252 seconds]
hsbt has joined #ruby-core
headius has quit [Quit: headius]
Domon has joined #ruby-core
hsbt has quit [Ping timeout: 252 seconds]
tylersmith has quit [Remote host closed the connection]
idkazuma has joined #ruby-core
hsbt has joined #ruby-core
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
nahiluhmot has joined #ruby-core
hsbt is now known as hsbt_away
nahiluhmot has quit [Remote host closed the connection]
tmahoney has quit [Remote host closed the connection]
nokada_ has joined #ruby-core
nokada has quit [Read error: Connection reset by peer]
idkazuma has quit [Remote host closed the connection]
nghialv2607 has joined #ruby-core
tylersmith has joined #ruby-core
tylersmith has quit [Ping timeout: 246 seconds]
marcandre has quit [Remote host closed the connection]
nghialv2607 has quit [Remote host closed the connection]
nokada_ has quit [Read error: Connection reset by peer]
nokada_ has joined #ruby-core
nokada has quit [Read error: Connection reset by peer]
vondruch has joined #ruby-core
kosaki2 has quit [Remote host closed the connection]
nghialv2607 has joined #ruby-core
judofyr has joined #ruby-core
headius has joined #ruby-core
headius has quit [Quit: headius]
ex9t has joined #ruby-core
ex9t_ has quit [Ping timeout: 256 seconds]
Domon has quit [Ping timeout: 248 seconds]
Domon has joined #ruby-core
Domon has quit [Remote host closed the connection]
Domon has joined #ruby-core
Domon has quit [*.net *.split]
eban has quit [*.net *.split]
Guest85414 has quit [*.net *.split]
eban has joined #ruby-core
Guest85414 has joined #ruby-core
Domon has joined #ruby-core
charliesome has joined #ruby-core
nokada has joined #ruby-core
nokada_ has quit [Ping timeout: 260 seconds]
xibbar has joined #ruby-core
hsbt has quit [Ping timeout: 260 seconds]
hsbt has joined #ruby-core
Domon has quit [Ping timeout: 245 seconds]
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
Domon has joined #ruby-core
hsbt has quit [Ping timeout: 264 seconds]
hsbt has joined #ruby-core
Domon has quit [Remote host closed the connection]
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
hsbt has quit [Ping timeout: 264 seconds]
hsbt has joined #ruby-core
adamjleonard has quit [Ping timeout: 252 seconds]
<znz_jp>
biff: [ruby-changes:28519] xibbar:r40571 (trunk): * lib/cgi/util.rb: class methods modulize for using like a function. - http://mla.n-z.jp/?ruby-changes=28519
kosaki8 has joined #ruby-core
nokada has quit [Remote host closed the connection]
nghialv2607 has quit [Remote host closed the connection]
kosaki8 has quit [Ping timeout: 256 seconds]
nari_ has joined #ruby-core
nghialv2607 has joined #ruby-core
idkazuma has joined #ruby-core
idkazuma has quit [Remote host closed the connection]
nahiluhmot has joined #ruby-core
xibbar has quit [Remote host closed the connection]
nahiluhmot has quit [Remote host closed the connection]
nagachika has joined #ruby-core
nokada has joined #ruby-core
nari_ has quit [Ping timeout: 268 seconds]
nahiluhmot has joined #ruby-core
nahiluhmot has quit [Read error: Connection reset by peer]
nahiluhmot has joined #ruby-core
nahiluhmot has quit [Read error: Connection reset by peer]
marcandre has joined #ruby-core
ZachBeta has joined #ruby-core
nghialv2_ has joined #ruby-core
nghialv2607 has quit [Ping timeout: 245 seconds]
idkazuma has joined #ruby-core
ZachBeta has quit [Client Quit]
ZachBeta has joined #ruby-core
nahiluhmot has joined #ruby-core
nahiluhmot has quit [Read error: Connection reset by peer]
shevy has quit [Ping timeout: 248 seconds]
idkazuma has quit [Remote host closed the connection]
ZachBeta has quit [Quit: Computer has gone to sleep.]
adamjleonard has quit [Read error: Connection reset by peer]
adamjleonard has joined #ruby-core
nahiluhmot has joined #ruby-core
adamjleonard has quit [Read error: Connection reset by peer]
ZachBeta has joined #ruby-core
nahiluhmot has left #ruby-core ["Leaving..."]
judofyr has quit [Remote host closed the connection]
fowl has quit [Ping timeout: 245 seconds]
nagachika has quit [Remote host closed the connection]
judofyr has joined #ruby-core
kosaki2 has quit [Remote host closed the connection]
tylersmith has joined #ruby-core
tmahoney has joined #ruby-core
kosaki2 has joined #ruby-core
judofyr has quit [Remote host closed the connection]
judofyr has joined #ruby-core
vondruch has quit [Ping timeout: 256 seconds]
judofyr has quit [Remote host closed the connection]
tylersmith has quit [Remote host closed the connection]
xibbar_i_ has joined #ruby-core
xibbar_ie has quit [Read error: Connection reset by peer]
headius has joined #ruby-core
nghialv2_ has quit [Remote host closed the connection]
kosaki2 has quit [Ping timeout: 264 seconds]
tylersmith has joined #ruby-core
peta_ has joined #ruby-core
<peta_>
hello everybody
<peta_>
I have a question about Ruby internals: when I include a module into my current scope, then (beside others) the instance methods of this module are "imported" into my current scope. Are these imported methods copies of the original ones, or are they internally the same/identical ones?
peta_ has quit [Remote host closed the connection]
peta_ has joined #ruby-core
<peta_>
When I include a module into my current scope (say inside another module or in the root namespace), the methods contained by this module will be somehow "imported" into my current scope. How exactly is this done? Are the methods copied/duplicated or does Ruby just create a local identifier that "references" the original method? (so regardless of how many times a given module is included, there will only be a single copy/instance of th
nghialv2607 has joined #ruby-core
nghialv2607 has quit [Remote host closed the connection]
<zzak>
peta_: try looking for rb_module_include() and rb_mod_include()
<zzak>
ie Module#include
<peta_>
zzak: okay, thx for the hint
ZachBeta has quit [Quit: Computer has gone to sleep.]
<peta_>
would you mind telling me the answer to my question? :) will the methods in the included class be duplicated or just linked through kind of local identifier?
<zzak>
peta_: i honestly dont know
<peta_>
zzak: okay, thx anyway. but say, is this the channel for ruby interpreter developers?
<zzak>
yes, but its fairly quiet usually
<tmahoney>
peta_: You're right, that method is a little weird looking.
marcandre has quit [Remote host closed the connection]
<peta_>
tmahoney: at least for a novice ruby end user like me that has no clue about the ruby interpreter internals
<tmahoney>
peta_: It looks like the methods aren't copied, but are referenced instead.
<tmahoney>
I'm not all that familiar with how things work in there, but I think so.
<tmahoney>
rb_include_class_new seems to create a new class klass
<tmahoney>
Then set the method table of that class to be that of the module you're including.
<tmahoney>
It sets the instance variable and constant tables of the new class to that module as well.
<tmahoney>
Then it sets the super class of the newly created class to the class you're including the module in.
heroux has quit [Ping timeout: 245 seconds]
<tmahoney>
But, I'm not sure how that makes anything work at all haha.
<peta_>
tmahoney: thanks a lot for this clarification. this already helped me a lot
<drbrain>
peta_: they're the same methods
heroux has joined #ruby-core
<drbrain>
peta_: there's a T_ICLASS that is created (I think it stands for "included class") and is stuck in the ancestors list
<tmahoney>
Ah, included class makes sense.
<peta_>
okay, so put simple, eveyrtime i include a module (and thus the methods it contains) anywhere, just links/aliases/callitwhatever are created that in the end point to the same function object
<peta_>
because i had a discussion with a (more experienced end user) guy in #ruby that tried to tell me that methods are copied/duplicated each time I include the containing module anywhere
<peta_>
and that sounded weird to me. so I wanted to clarify this
kosaki2 has joined #ruby-core
ZachBeta has joined #ruby-core
<drbrain>
module M; def a() end end; class C; include M; end; C.instance_methods - Object.methods; module M; def b() end end; C.instance_methods - Object.methods
<drbrain>
when M#b is added it appears in C, so I don't think the method table is copied
shiba has quit [Ping timeout: 256 seconds]
shiba has joined #ruby-core
marcandre has joined #ruby-core
pdswan_ has joined #ruby-core
pdswan has quit [Ping timeout: 264 seconds]
kosaki2 has quit [Remote host closed the connection]
heroux has quit [Read error: Operation timed out]
heroux has joined #ruby-core
fowl has joined #ruby-core
idkazuma has joined #ruby-core
idkazuma has quit [Remote host closed the connection]
idkazuma has joined #ruby-core
headius has quit [Quit: headius]
kosaki2 has joined #ruby-core
<znz_jp>
biff: [ruby-changes:28520] kosaki:r40572 (trunk): * include/ruby/defines.h (RUBY_ATTR_ALLOC_SIZE): New for - http://mla.n-z.jp/?ruby-changes=28520