Skip to content
Browse files

Add Maglev.[] and Maglev.[]= as accessors for root

  • Loading branch information...
1 parent fb497e6 commit f01e98885e8ac7f67031da6c89c0708ef1f4ee65 @johnnyt johnnyt committed Feb 18, 2014
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/kernel/bootstrap/Maglev.rb
View
10 src/kernel/bootstrap/Maglev.rb
@@ -50,7 +50,15 @@ module Maglev
def root
PERSISTENT_ROOT
end
- module_function :root
+
+ def [](key)
+ root[key]
+ end
+
+ def []=(key, value)
+ root[key] = value
+ end
+ module_function :root, :[], :[]=
# Executes the block with the current thread in transient mode, which
# affects the following operations:

0 comments on commit f01e988

Please sign in to comment.
Something went wrong with that request. Please try again.