sanzang 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sanzang/platform.rb +2 -2
- data/lib/sanzang/translator.rb +6 -2
- data/lib/sanzang/version.rb +1 -1
- metadata +2 -2
data/lib/sanzang/platform.rb
CHANGED
@@ -70,8 +70,8 @@ module Sanzang::Platform
|
|
70
70
|
if os_name =~ /mingw|mswin/
|
71
71
|
require 'win32ole'
|
72
72
|
result = WIN32OLE.connect("winmgmts://").ExecQuery(
|
73
|
-
|
74
|
-
result.to_enum.
|
73
|
+
"select NumberOfLogicalProcessors from Win32_Processor")
|
74
|
+
result.to_enum.collect(&:NumberOfLogicalProcessors).reduce(:+)
|
75
75
|
elsif File.readable?("/proc/cpuinfo")
|
76
76
|
IO.read("/proc/cpuinfo").scan(/^processor/).size
|
77
77
|
elsif File.executable?("/usr/bin/hwprefs")
|
data/lib/sanzang/translator.rb
CHANGED
@@ -116,8 +116,12 @@ module Sanzang
|
|
116
116
|
io_out.write(
|
117
117
|
gen_listing(buffer, io_in.lineno - buffer.rstrip.count("\n")))
|
118
118
|
ensure
|
119
|
-
|
120
|
-
|
119
|
+
if input.kind_of?(String) and defined?(io_in) and io_in
|
120
|
+
io_in.close if not io_in.closed?
|
121
|
+
end
|
122
|
+
if output.kind_of?(String) and defined?(io_out) and io_out
|
123
|
+
io_out.close if not io_out.closed?
|
124
|
+
end
|
121
125
|
end
|
122
126
|
|
123
127
|
# The TranslationTable used by the Translator
|
data/lib/sanzang/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sanzang
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-11-
|
12
|
+
date: 2013-11-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: parallel
|