rscript 0.1.22 → 0.1.23
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rscript.rb +8 -9
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9e00e19717692274be0ddcd8a74b4f767c6e249
|
4
|
+
data.tar.gz: 4dd9d0359d2ca593bc8db62217c9e1df4d7788f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a56b811415cb44b38fd3f8930b7e381728276b0aed89286a95752dce4d9f08dcdbfde0c3873e7653ef00ec1e1ce7f76e5643e1ea3584ecc04ad1581392bb3da
|
7
|
+
data.tar.gz: fd5bf4e5b23d05b76c37164984feb4ab1720caf27ca55893ea819a860b439c82af072f81441e1ec7add134fa9beaed4f674e0affbf4dd1adf1f64cbb0683f04e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rscript.rb
CHANGED
@@ -3,10 +3,11 @@
|
|
3
3
|
#file: rscript.rb
|
4
4
|
|
5
5
|
# created: 1-Jul-2009
|
6
|
-
# updated:
|
6
|
+
# updated: 02-Nov-2013
|
7
7
|
|
8
8
|
# modification:
|
9
9
|
|
10
|
+
# 02-Nov-2013: Replaced XThreads with a simle thread
|
10
11
|
# 01-Nov-2013: XThreads now handles the execution of eval statements;
|
11
12
|
# 08-Aug-2013: re-enabled the hashcache;
|
12
13
|
# 24-Jun-2011: disabled the hashcache
|
@@ -30,14 +31,12 @@
|
|
30
31
|
|
31
32
|
require 'rscript_base'
|
32
33
|
require 'hashcache'
|
33
|
-
|
34
|
+
|
34
35
|
|
35
36
|
class RScript < RScriptBase
|
36
37
|
|
37
38
|
def initialize(opt={})
|
38
39
|
@rsf_cache = HashCache.new({cache: 5}.merge(opt))
|
39
|
-
@xthreads = XThreads.new
|
40
|
-
@id = 0
|
41
40
|
end
|
42
41
|
|
43
42
|
def read(args=[])
|
@@ -91,13 +90,13 @@ class RScript < RScriptBase
|
|
91
90
|
code2, args = self.read raw_args
|
92
91
|
|
93
92
|
begin
|
94
|
-
|
95
93
|
|
96
|
-
|
97
|
-
|
94
|
+
|
95
|
+
thread = Thread.new(code2) {|x| Thread.current['result'] = eval x}
|
96
|
+
thread.join
|
97
|
+
#r = eval code2
|
98
|
+
r = thread['result']
|
98
99
|
|
99
|
-
@id += 1
|
100
|
-
r = xthread.result
|
101
100
|
params = {}
|
102
101
|
return r
|
103
102
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rscript
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -29,7 +29,7 @@ cert_chain:
|
|
29
29
|
2tHFESql9unw2f1cmqvD6DMfA2vVH7UJJoxEbkE1ECWj9QoYqYpgDvaSp0Z0WYD1
|
30
30
|
Xj5QxdIHOcsEDKdkQpPw4y7x8lNM2Bww
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date: 2013-11-
|
32
|
+
date: 2013-11-02 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: hashcache
|
metadata.gz.sig
CHANGED
Binary file
|