mattknox-repl 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/repl.rb +3 -3
- metadata +1 -1
data/lib/repl.rb
CHANGED
@@ -3,8 +3,8 @@ REPL_CONTEXT_STACK = [binding]
|
|
3
3
|
|
4
4
|
module Repl
|
5
5
|
def repl
|
6
|
-
DEFAULT_STARTING_SELF.cb
|
7
|
-
REPL_CONTEXT_STACK.push(
|
6
|
+
DEFAULT_STARTING_SELF.cb binding
|
7
|
+
REPL_CONTEXT_STACK.push(binding)
|
8
8
|
end
|
9
9
|
|
10
10
|
def stop_repl
|
@@ -13,7 +13,7 @@ module Repl
|
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
module HookRepl
|
16
|
+
module HookRepl # FIXME: not everything unterstands class_eval. Maybe need an "eval in this thing method?"
|
17
17
|
def self.replize_object(obj, class_or_instance_or_both = :both)
|
18
18
|
obj.class_eval "extend Repl" if [:class, :both].member?(class_or_instance_or_both)
|
19
19
|
obj.class_eval "include Repl" if [:object, :both].member?(class_or_instance_or_both)
|