[ruby-core:93694] [Ruby master Bug#9703] Inconsistent profile output

From: merch-redmine@...
Date: 2019-07-11 22:25:43 UTC
List: ruby-core #93694
Issue #9703 has been updated by jeremyevans0 (Jeremy Evans).

Status changed from Open to Closed

The profile library was removed in commit:bc76d8a232bed2e245cd3997ebd9826938f7a738.

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

* Author: silverhammermba (Max Anselm)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* 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/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next