procemon 0.4.4 → 0.4.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.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWIxMmNiZTVjODNjNDI4YjRlOTBkMDQyN2YxMDc4NjQ4MmI0MmRjNA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzJjMTViN2Q1N2MzOGZjMzdjYTU4MzBiMDVlN2JhMTFkZDljZmQ5Ng==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzgyY2RlMmQwMTM1MzA2YzRjMzFmMzljMzdlMTc1NGNmOGQzYWM1M2E4ZDA4
|
10
|
+
NWJkNDM3NzdlZWQxMjQ5ZWVlZTY3YTFiNTIxMDFlYTI4Y2M1NTZkNmQ3ZDZi
|
11
|
+
NDE1YzYyY2E0Y2JjMTg3NGQzODcxOWRiNjZmMWJiMThiY2M4Yjk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZGZmZTQ0OThjNjRjNzIzNTcxZDE4ZjUxZGFiOGE5M2IxZTM2Zjk1YTRhYjBj
|
14
|
+
OWE3NGZhYzc3NzQzZjM4NGU2NDkxYjNjMzJkMjYxOTJiMzBmZGYxMDQ1NzU4
|
15
|
+
NWM2MWYwNjAxOGZkYTg2MjI1MzU3MWE0MzgzNGVkNTM3Njc4NzI=
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.5
|
@@ -10,8 +10,8 @@ module MethodToProcSource
|
|
10
10
|
block= 0
|
11
11
|
end
|
12
12
|
|
13
|
-
unless ProcSource.source_cache[self.
|
14
|
-
return ProcSource.source_cache[self.
|
13
|
+
unless ProcSource.source_cache[self.inspect].nil?
|
14
|
+
return ProcSource.source_cache[self.inspect]
|
15
15
|
else
|
16
16
|
|
17
17
|
File.open(File.expand_path(self.source_location[0])
|
@@ -44,7 +44,7 @@ module MethodToProcSource
|
|
44
44
|
return_string.sub!(/^[^{]*(?!={)/,'Proc.new')
|
45
45
|
end
|
46
46
|
|
47
|
-
ProcSource.source_cache[self.
|
47
|
+
ProcSource.source_cache[self.inspect]= return_string
|
48
48
|
|
49
49
|
return return_string
|
50
50
|
end
|
@@ -10,8 +10,8 @@ class Proc
|
|
10
10
|
block= 0
|
11
11
|
end
|
12
12
|
|
13
|
-
unless
|
14
|
-
return ProcSource.source_cache[self.
|
13
|
+
unless inspect.nil?
|
14
|
+
return ProcSource.source_cache[self.inspect]
|
15
15
|
else
|
16
16
|
|
17
17
|
File.open(File.expand_path(self.source_location[0])
|
@@ -28,7 +28,7 @@ class Proc
|
|
28
28
|
return_string.sub!(/^[^{]*(?!={)/,'Proc.new')
|
29
29
|
end
|
30
30
|
|
31
|
-
ProcSource.source_cache[self.
|
31
|
+
ProcSource.source_cache[self.inspect]= return_string
|
32
32
|
|
33
33
|
return return_string
|
34
34
|
end
|
@@ -2,8 +2,11 @@ class ProcSource < String
|
|
2
2
|
|
3
3
|
class << self
|
4
4
|
attr_accessor :source_cache
|
5
|
+
attr_accessor :eval_keys
|
5
6
|
end
|
6
7
|
self.source_cache= Hash.new
|
8
|
+
self.eval_keys= Array.new
|
9
|
+
|
7
10
|
|
8
11
|
def self.build(source_code_to_be_wrappered,*params_obj_array)
|
9
12
|
self.new(source_code_to_be_wrappered).wrapper_around!(*params_obj_array)
|
@@ -34,10 +37,12 @@ class ProcSource < String
|
|
34
37
|
return_proc= eval(self,binding)
|
35
38
|
end
|
36
39
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
40
|
+
if ProcSource.eval_keys.count > 100
|
41
|
+
ProcSource.eval_keys.each {|e| ProcSource.source_cache.delete(e) }
|
42
|
+
ProcSource.eval_keys.clear
|
43
|
+
end
|
44
|
+
ProcSource.source_cache[return_proc.inspect]= self
|
45
|
+
ProcSource.eval_keys.push return_proc.inspect
|
41
46
|
|
42
47
|
return return_proc
|
43
48
|
end
|