These are chat archives for ManageIQ/manageiq/performance

15th
Nov 2016
Ari Zellner
@zeari
Nov 15 2016 14:30
Does anyone know where cache_with_timeout is defined?
Ari Zellner
@zeari
Nov 15 2016 14:36
thanks @chrisarcand
Jason Frey
@Fryguy
Nov 15 2016 14:36
@zeari Super sekrit trick: MyModel.method(:cache_with_timeout).source_location
if you get nil, it's in C source (C extension or base Ruby)
Chris Arcand
@chrisarcand
Nov 15 2016 14:40
#sekrit
Ari Zellner
@zeari
Nov 15 2016 14:42
@Fryguy :O
good one
Keenan Brock
@kbrock
Nov 15 2016 14:43
Also, sometimes you want to find out where a module was defined
too much of a pain in the neck, just choose a method and do the above trick
because the method location is the same as the module location
Chris Arcand
@chrisarcand
Nov 15 2016 14:44
? Does Ruby actually keep track of that? I was just….ah I see @kbrock
Was just talking with zenspider at rubyconf and he was talking about nice it would be if Ruby made class/module nodes keep that metadata as methods currently do.
Keenan Brock
@kbrock
Nov 15 2016 14:46
that could be cool