Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit f01e98885e8ac7f67031da6c89c0708ef1f4ee65 1 parent fb497e6
@johnnyt johnnyt authored
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:
Please sign in to comment.
Something went wrong with that request. Please try again.