Issue #9703 has been reported by Max Anselm.

----------------------------------------
Bug #9703: Inconsistent profile output
https://bugs.ruby-lang.org/issues/9703

* Author: Max Anselm
* Status: Open
* Priority: Normal
* Assignee: 
* Category: lib
* Target version: current: 2.2.0
* ruby -v: ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
The output of the profile lib seems to be partially dependent on how it is required. For example,

~~~
ruby -rprofile -e '0==1'
~~~
shows one call to Fixnum#== as expected

~~~
ruby -e 'require "profile"; 0==1'
~~~
does not show any calls to Fixnum#== !!!

~~~
ruby -e 'require "profile"; eval("0==1")'
~~~
again shows one call to Fixnum#== as expected.

See also: http://stackoverflow.com/questions/22861559/what-is-the-difference-between-r-profile-and-require-profile



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