This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #coding: utf-8 | |
| import os | |
| import subprocess | |
| import time | |
| import argparse | |
| import random | |
| import shutil | |
| import sys | |
| import itertools | |
| import signal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Env < Hash | |
| def initialize(keys=[], vals=[], outer=nil) | |
| @outer = outer | |
| keys.zip(vals).each{|p| store(*p)} | |
| end | |
| def [](name) super(name) || @outer[name] end | |
| def set(name, value) key?(name) ? store(name, value) : @outer.set(name, value) end | |
| end | |
| def add_globals(env) |