Issue #6821 has been reported by dbussink (Dirkjan Bussink).

----------------------------------------
Bug #6821: GC::Profiler.enabled? returns 0 when enabled
https://bugs.ruby-lang.org/issues/6821

Author: dbussink (Dirkjan Bussink)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: 1.9.3p194


GC::Profiler.enabled? returns 0 when GC::Profiler is enabled, contrary to the documentation that states it returns either true or false. Looking at the code, I think it's an oversight because objspace->profile.run isn't properly wrapped for a VALUE. So TRUE is returned, which is 1 as a VALUE which equals the value for the Fixnum 0. 

This changeset should fix the problem:

https://gist.github.com/9fe02bd47515cbbcced7


-- 
http://bugs.ruby-lang.org/