rscript 0.1.22 → 0.1.23

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 09225863f86a293eaa1eeacd5dd7ac3bac35890b
4
- data.tar.gz: addefddb15a0aa2e1b2a5c103de0c6a9709deb96
3
+ metadata.gz: c9e00e19717692274be0ddcd8a74b4f767c6e249
4
+ data.tar.gz: 4dd9d0359d2ca593bc8db62217c9e1df4d7788f4
5
5
  SHA512:
6
- metadata.gz: 0feaf3e6b31d572c5f7c3003e4ba3551b628d092630b1ba2ed4004022a6e01fbfaed288627f7ae50242e7febde1acb4ad83f0274b3c67c8669347a6a3ceb0668
7
- data.tar.gz: b2cb8a4924c1580c2c7773007f8f310537b7679dd226d4059b19bdcd2c38f5f8074580217afd034445485193e8bb0fceb536a97c472bff6f27daf0852504d874
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: 01-Nov-2013
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
- require 'xthreads'
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
- xthread = @xthreads.create_thread('thread' + @id.to_s) { eval code2}
97
- xthread.start
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.22
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-01 00:00:00.000000000 Z
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