diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-12-07 15:46:49 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-12-07 15:46:49 +0000 |
| commit | c9effa8ce0d3f423abcc98e1b3d39c736cb0947b (patch) | |
| tree | d18032936aa231b6e81dd85f193348fdf404713f | |
| parent | d2e2d320ab2a679c66edefbaed2c3a785956349e (diff) | |
| download | ruby-c9effa8ce0d3f423abcc98e1b3d39c736cb0947b.tar.gz ruby-c9effa8ce0d3f423abcc98e1b3d39c736cb0947b.tar.xz ruby-c9effa8ce0d3f423abcc98e1b3d39c736cb0947b.zip | |
* eval.c (call_trace_func): klass parameter should be a
class/module that defines calling method. [ruby-talk:169307]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | eval.c | 2 | ||||
| -rw-r--r-- | lib/profiler.rb | 2 |
3 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Thu Dec 8 00:40:52 2005 Yukihiro Matsumoto <matz@ruby-lang.org> + + * eval.c (call_trace_func): klass parameter should be a + class/module that defines calling method. [ruby-talk:169307] + Wed Dec 7 17:10:27 2005 Kazuhiro NISHIYAMA <zn@mbf.nifty.com> * sprintf.c (rb_f_sprintf): [ruby-dev:27967] @@ -2514,7 +2514,7 @@ call_trace_func(rb_event_t event, NODE *node, VALUE self, ID id, VALUE klass /* klass = RBASIC(klass)->klass; } else if (FL_TEST(klass, FL_SINGLETON)) { - klass = self; + klass = rb_iv_get(klass, "__attached__"); } } PUSH_TAG(PROT_NONE); diff --git a/lib/profiler.rb b/lib/profiler.rb index 9762fa118..1067106be 100644 --- a/lib/profiler.rb +++ b/lib/profiler.rb @@ -34,7 +34,7 @@ module_function total = Process.times[0] - @@start if total == 0 then total = 0.01 end data = @@map.values - data.sort!{|a,b| b[2] <=> a[2]} + data = data.sort_by{|x| x[2]} sum = 0 f.printf " %% cumulative self self total\n" f.printf " time seconds seconds calls ms/call ms/call name\n" |
