Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

GcTime profiler checks against incorrect object for respond_to?(:total_time)

#6435

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.

Reported by jnimety · February 15th, 2011 @ 07:24 PM

State: committed
Milestone: 3.0.5
Assigned to: Santiago Pastorino Santiago Pastorino
Importance: Low

Activity

  1. yonkeltron
    yonkeltron

    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
    

    February 15th, 2011 @ 07:32 PM

  2. Santiago Pastorino
    Santiago Pastorino
    • 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.

    February 15th, 2011 @ 08:32 PM

  3. jnimety
  4. Repository
    Repository
    • 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...

    February 15th, 2011 @ 10:15 PM

  5. Repository
    Repository

    (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...

    February 15th, 2011 @ 10:15 PM