summaryrefslogtreecommitdiff
path: root/benchmark/hash_to_proc.rb
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/hash_to_proc.rb')
-rw-r--r--benchmark/hash_to_proc.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/benchmark/hash_to_proc.rb b/benchmark/hash_to_proc.rb
new file mode 100644
index 0000000000..2b675bf509
--- /dev/null
+++ b/benchmark/hash_to_proc.rb
@@ -0,0 +1,9 @@
+h = {}
+
+10000.times do |i|
+ h[i] = nil
+end
+
+5000.times do |i|
+ [i].map(&h)
+end