From 446b9c040839d9a7d48838ffb2220cf6db19a4a8 Mon Sep 17 00:00:00 2001 From: Jeremy Roach Date: Wed, 2 Jul 2008 15:08:35 -0500 Subject: [PATCH] add CompiledMethod#compile_all Convenience method to compile all CompiledMethods reachable from self --- kernel/core/compiled_method.rb | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/kernel/core/compiled_method.rb b/kernel/core/compiled_method.rb index b1b0b24..8b42756 100644 --- a/kernel/core/compiled_method.rb +++ b/kernel/core/compiled_method.rb @@ -573,6 +573,12 @@ class CompiledMethod return high_mark, exact end + def compile_all + all_methods.each do |cm| + cm.compile + end + end + # Represents virtual machine's CPU instruction. # Instructions are organized into instruction # sequences known as iSeq, forming body -- 1.5.4