This project is archived and is in readonly mode.
GcTime profiler checks against incorrect object for respond_to?(:total_time)
Reported by jnimety | February 15th, 2011 @ 07:24 PM | in 3.0.5
The GcTime profile test does not work on ruby 1.9.2 because the class incorrectly checks GC.respond_to?(:total_time) when it should check GC::Profiler.respond_to?(:total_time). I have attached a patch.
Comments and changes to this ticket
-
yonkeltron February 15th, 2011 @ 07:32 PM
I can confirm this bug exists using Rails 3.0.4 with Ruby 1.9.2-p136 on Debian Squeeze.
$ uname -a Linux Akiba 2.6.32-5-686 [#1](/projects/8994/tickets/1 "Ticket #1") SMP Wed Jan 12 04:01:41 UTC 2011 i686 GNU/Linux $ ruby --version ruby 1.9.2p136 (2010-12-25 revision 30365) [i686-linux] $ rails --version Rails 3.0.4
-
Santiago Pastorino February 15th, 2011 @ 08:32 PM
- State changed from new to open
- Milestone set to 3.0.5
- Assigned user set to Santiago Pastorino
- Importance changed from to Low
Good catch but is not the appropriate fix you will break 1.8 with that.
Just check for defined?(GC::Profiler).
Thanks. -
jnimety February 15th, 2011 @ 10:03 PM
- no changes were found...
-
Repository February 15th, 2011 @ 10:15 PM
- State changed from open to committed
(from [ef573342106369b07bb5c97a0db0b121d6d18621]) GcTime incorrectly checks GC.respond_to?(:total_time), it should check GC::Profiler.respond_to?(:total_time)
[#6435 state:committed]
Signed-off-by: Santiago Pastorino santiago@wyeworks.com
https://github.com/rails/rails/commit/ef573342106369b07bb5c97a0db0b... -
Repository February 15th, 2011 @ 10:15 PM
(from [0cee3034c4bb26e8b82bda513694b9e650961744]) GcTime incorrectly checks GC.respond_to?(:total_time), it should check GC::Profiler.respond_to?(:total_time)
[#6435 state:committed]
Signed-off-by: Santiago Pastorino santiago@wyeworks.com
https://github.com/rails/rails/commit/0cee3034c4bb26e8b82bda513694b...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 6435 GcTime profiler checks against incorrect object for respond_to?(:total_time) [#6435 state:committed]
- 6435 GcTime profiler checks against incorrect object for respond_to?(:total_time) [#6435 state:committed]