nmollerup has quit [Remote host closed the connection]
eddof13 has quit [Client Quit]
hightower4 has joined #ruby
mmohammadi9812 has joined #ruby
hightower3 has quit [Ping timeout: 264 seconds]
mmohammadi9812 has quit [Remote host closed the connection]
mmohammadi9812 has joined #ruby
johnjaye has joined #ruby
mmohammadi9812 has quit [Ping timeout: 252 seconds]
znpy has quit [Ping timeout: 255 seconds]
yaw has quit [Ping timeout: 255 seconds]
_ht has quit [Remote host closed the connection]
user71 has quit [Quit: Leaving]
yaw has joined #ruby
Vonter has quit [Ping timeout: 268 seconds]
Vonter has joined #ruby
yaw has quit [Ping timeout: 256 seconds]
Linux_Kerio has quit [Read error: Connection reset by peer]
Linux_Kerio has joined #ruby
yaw has joined #ruby
<henk>
https://docs.ruby-lang.org/en/master/Class.html#method-i-new is still the only official place I can find where there is mention of the "initialize" method: »Calls allocate to create a new object of class’s class, then invokes that object’s initialize method, passing it args.« but the `initialize` is not typeset differently than normal text, so it’s not really clear that the initialize
<henk>
function is actually called "initialize". one might still think it’s also called "new" and one shouldn’t be blamed IMHO o_O this is weird … is anyone here with influence on this and can change the formatting at least? maybe even rephrase it a bit?
<henk>
it’s trivial to find out it actually is called "initialize" in third party documentation but having it clear in the official docs would be preferable IMHO
yaw has quit [Ping timeout: 252 seconds]
yaw has joined #ruby
yaw has quit [Ping timeout: 255 seconds]
Linux_Kerio has quit [Read error: Connection reset by peer]
Linux_Kerio has joined #ruby
znpy has joined #ruby
yaw has joined #ruby
johnjaye has quit [Ping timeout: 256 seconds]
johnjaye has joined #ruby
Linux_Kerio has quit [Ping timeout: 255 seconds]
znpy has quit [Ping timeout: 255 seconds]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
Guest9909 has quit [Quit: WeeChat 4.2.1]
<[0x1eef_]>
IIRC the logic is essentially this: def self.new(...); obj = allocate; obj.send(:initialize, ...); obj; end
<[0x1eef_]>
Probably a doc example along those lines would be clearest.
<weaksauc_>
henk it does mention that it calls the initialize method. if you look at the allocate link it shows you what allocate does
desnudopenguino1 has joined #ruby
<weaksauc_>
but to be fair the docs are a bit of a mess imo
desnudopenguino has quit [Ping timeout: 256 seconds]
desnudopenguino1 is now known as desnudopenguino
<[0x1eef_]>
I think they've improved compared to years ago. Docs in Ruby have always been hit and miss.