summaryrefslogtreecommitdiff
path: root/ruby_1_9_3/benchmark/bm_vm2_proc.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ruby_1_9_3/benchmark/bm_vm2_proc.rb')
-rw-r--r--ruby_1_9_3/benchmark/bm_vm2_proc.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/ruby_1_9_3/benchmark/bm_vm2_proc.rb b/ruby_1_9_3/benchmark/bm_vm2_proc.rb
new file mode 100644
index 0000000000..3f51056bf9
--- /dev/null
+++ b/ruby_1_9_3/benchmark/bm_vm2_proc.rb
@@ -0,0 +1,14 @@
+def m &b
+ b
+end
+
+pr = m{
+ a = 1
+}
+
+i=0
+while i<6_000_000 # benchmark loop 2
+ i+=1
+ pr.call
+end
+