irby 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/irby.rb +11 -6
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.4.
|
1
|
+
1.4.1
|
data/lib/irby.rb
CHANGED
@@ -1,12 +1,17 @@
|
|
1
1
|
require 'irb'
|
2
2
|
|
3
|
-
|
3
|
+
module IRBy
|
4
|
+
def self.binding_stack
|
5
|
+
@binding_stack ||= []
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
4
9
|
set_trace_func lambda { |event, file, line, id, binding, klass|
|
5
10
|
case event
|
6
|
-
when
|
7
|
-
|
8
|
-
when
|
9
|
-
|
11
|
+
when /call$/
|
12
|
+
IRBy.binding_stack << binding
|
13
|
+
when /return$/
|
14
|
+
IRBy.binding_stack.pop
|
10
15
|
end
|
11
16
|
}
|
12
17
|
|
@@ -38,7 +43,7 @@ class Object
|
|
38
43
|
if specific_binding
|
39
44
|
target_binding = specific_binding
|
40
45
|
else
|
41
|
-
caller_binding =
|
46
|
+
caller_binding = IRBy.binding_stack[-2]
|
42
47
|
if self == caller_binding.eval('self')
|
43
48
|
target_binding = caller_binding
|
44
49
|
else
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 4
|
8
|
-
-
|
9
|
-
version: 1.4.
|
8
|
+
- 1
|
9
|
+
version: 1.4.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- jugyo
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-10-03 00:00:00 +09:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|