GC::Profiler.enabled? returns 0 when enabled
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:
gc.c: return true or false. Patch by Dirkjan Bussink. [Bug #6821]
test/ruby/test_gc.rb: add test-case for this bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Updated by authorNari (Narihiro Nakamura) over 6 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100