eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
victori has joined #ruby
Vonter has quit [Ping timeout: 252 seconds]
Vonter has joined #ruby
konsolebox has quit [Ping timeout: 260 seconds]
eddof13 has joined #ruby
willfish has quit [Quit: WeeChat 4.0.4]
<adam12>
johnjaye: Yes, you've got it correct.
<johnjaye>
ok
<johnjaye>
the truth is revealed
_ht has joined #ruby
hightower2 has joined #ruby
polishdub has quit [Remote host closed the connection]
<leftylink>
but Array.methods tells you the methods of Array, not of an array like []. So what does `Array.methods - Enumerable.methods` really tell you? I don't think it tells you anything at all
polishdub has joined #ruby
<leftylink>
wouldn't it make much more sense to group each of `[].methods` by Method#owner ?
<leftylink>
you would need to turn each of the symbols (returned by #methods) into Method, but I omit obvious details
<leftylink>
an example of what I mean
<leftylink>
pandabot: rb class C; def foo; end end; [C.methods.include?(:foo), C.new.methods.include?(:foo)]
<leftylink>
since C.methods.include?(:foo) is false, Array.methods tells you nothing.
reset has joined #ruby
<johnjaye>
ah ok
konsolebox has joined #ruby
Aminda has quit [Ping timeout: 252 seconds]
Aminda has joined #ruby
dviola has joined #ruby
markong has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #ruby
caedmon has joined #ruby
caedmon has quit [Ping timeout: 255 seconds]
markong has quit [Ping timeout: 246 seconds]
Aminda has quit [Remote host closed the connection]
Aminda has joined #ruby
ule has quit [Changing host]
ule has joined #ruby
Linux_Kerio has quit [Ping timeout: 255 seconds]
infinityfye has quit [Quit: Leaving]
_ht has quit [Quit: _ht]
markong has joined #ruby
otisolsen70 has quit [Quit: Leaving]
polishdub has quit [Ping timeout: 260 seconds]
polishdub has joined #ruby
dostoyevsky2 has quit [Quit: leaving]
dostoyevsky2 has joined #ruby
markong has quit [Ping timeout: 272 seconds]
teclator has quit [Ping timeout: 258 seconds]
konsolebox has quit [Ping timeout: 260 seconds]
reset has quit [Quit: reset]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #ruby
<havenwood>
johnjaye: For what it's worth, you can `Array.instance_methods(false)` or `[].public_methods(false)` to see the methods defined on Array.
<havenwood>
johnjaye: If you want to know where a method is defined, you can ask it about its owner. (E.g., with `chunk` you could `[].method(:chunk).owner`.)
<havenwood>
johnjaye: In irb take a look at `ls []` or `ls Array`.
konsolebox has joined #ruby
cybniv has joined #ruby
niv has quit [Read error: Connection reset by peer]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
CalimeroTeknik has quit [Ping timeout: 240 seconds]
markong has joined #ruby
Aminda has quit [Ping timeout: 252 seconds]
CalimeroTeknik has joined #ruby
Aminda has joined #ruby
dviola has quit [Ping timeout: 240 seconds]
diego has joined #ruby
diego is now known as Guest1927
toonlink has joined #ruby
<toonlink>
i'm attempting to make a "custom variable assignment operator" via essentially using method_missing (i am aware it is the devil) to make undefined variable names return an object that then takes a <=> method that handles assignment. is there any way to do this that'd ensure any typos i make inside of an instance_eval actually raise errors instead of just creating a new "custom operator" object?
<johnjaye>
hmm. if i do ls [] then it shows some methods marked Array and others marked Enumerable
<johnjaye>
The thing is, any? is clearly an Enumerable thing but it's listed under array
<weaksauce>
johnjaye any? is defined on array too
<weaksauce>
so that might be why
<johnjaye>
i don't follow
<weaksauce>
as in they wrote extra code to define any? for array handling instead of the generic enumerable code
<johnjaye>
my thought was Enumerable defines any? as an abstract thing. which array then implements
<johnjaye>
hmm. wait so Enumerable defines any? as an actual function