sanzang 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,8 +3,9 @@
3
3
  == Supported platforms
4
4
 
5
5
  These programs should work on all platforms with Ruby 1.9 or later. Regular
6
- testing takes place on GNU/Linux operating systems. \Sanzang has not been fully
7
- tested on other implementations of Ruby (e.g. JRuby, Rubinius, etc.).
6
+ testing takes place on GNU/Linux operating systems. \Sanzang also runs on
7
+ JRuby, although the runtime performance is usually slower than MRI. \Sanzang
8
+ has not been tested on other Ruby implementations such as Rubinius.
8
9
 
9
10
  == Languages and scope
10
11
 
@@ -27,9 +28,12 @@ fork(2) perfectly, so Ruby 1.9+ on Cygwin can utilize the fork method, so
27
28
  it supports standard multiprocessing. Therefore, Cygwin is the most robust
28
29
  environment for running \Sanzang on a computer with Windows.
29
30
 
31
+ For JRuby, \Sanzang does not use fork(2) and multiprocessing, but rather uses
32
+ Java threads to achieve high performance for batch processing.
33
+
30
34
  == Text encoding quirks
31
35
 
32
- Converters for several encodings have not yet been implemented by YARV. Most of
36
+ Converters for several encodings have not yet been implemented by MRI. Most of
33
37
  these are obscure and not widely used. Perhaps the most notable is EUC-TW,
34
38
  which is an old Unix encoding for traditional Chinese. Text encodings that
35
39
  cannot be converted to and from UTF-8 are not currently supported.
@@ -63,10 +63,10 @@ module Sanzang::Command
63
63
  fout.binmode.set_encoding(@encoding)
64
64
  fout.write(Sanzang::TextFormatter.new.reflow_cjk(fin.read))
65
65
  ensure
66
- if defined?(fin) and fin != $stdin
66
+ if defined?(fin) and fin.class == File
67
67
  fin.close if not fin.closed?
68
68
  end
69
- if defined?(fout) and fin != $stdout
69
+ if defined?(fout) and fout.class == File
70
70
  fout.close if not fout.closed?
71
71
  end
72
72
  end
@@ -67,10 +67,10 @@ module Sanzang::Command
67
67
  fout.binmode.set_encoding(@encoding)
68
68
  translator.translate_io(fin, fout)
69
69
  ensure
70
- if defined?(fin) and fin != $stdin
70
+ if defined?(fin) and fin.class == File
71
71
  fin.close if not fin.closed?
72
72
  end
73
- if defined?(fout) and fin != $stdout
73
+ if defined?(fout) and fout.class == File
74
74
  fout.close if not fout.closed?
75
75
  end
76
76
  end
@@ -19,6 +19,6 @@ module Sanzang
19
19
 
20
20
  # Current version number of Sanzang
21
21
  #
22
- VERSION = "1.0.5"
22
+ VERSION = "1.0.6"
23
23
 
24
24
  end
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.5
4
+ version: 1.0.6
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-10-13 00:00:00.000000000 Z
12
+ date: 2013-11-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: parallel