There was an error while loading. Please reload this page.
1 parent d59be9a commit 139aaa9Copy full SHA for 139aaa9
1 file changed
lib/quickdraw.rb
@@ -1,7 +1,17 @@
1
# frozen_string_literal: true
2
3
module Quickdraw
4
- Box = Ruby::Box.new
+ module NoBox
5
+ def self.require(...)
6
+ Kernel.require(...)
7
+ end
8
+
9
+ def self.const_missing(name)
10
+ Kernel.const_get(name).tap { |it| const_set(name, it) }
11
12
13
14
+ Box = (defined?(Ruby::Box) && ENV["RUBY_BOX"]) ? Ruby::Box.new : NoBox
15
16
autoload :CLI, "quickdraw/cli"
17
autoload :Test, "quickdraw/test"
0 commit comments