sanzang 1.0.8 → 1.0.9
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
- data/HACKING.rdoc +3 -2
- data/lib/sanzang/platform.rb +6 -1
- data/lib/sanzang/translator.rb +4 -2
- data/lib/sanzang/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 988a94b60e0d495fa6acc7d549db71651c120ede
|
4
|
+
data.tar.gz: d7ee8eea313da3675d0bf361187a28bf29b1d5d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d87950bf395184c0cb2ac661810d97f07bf36669c7366c556850f9e85cf51f05280c817b2bafa3c37c9b0ba30dfcf895b91c9372d672bc654f5e4d8063cbb706
|
7
|
+
data.tar.gz: 1df1b05c839c2f55ff0f85f96b08676ee9335c8a96aaf73cb137d0ff9963e4bd10c1401145c5959232d8e955d1f59d9572ddc1d781b846d42003a085c4b81375
|
data/HACKING.rdoc
CHANGED
@@ -4,8 +4,9 @@
|
|
4
4
|
|
5
5
|
These programs should work on all platforms with Ruby 1.9 or later. Regular
|
6
6
|
testing takes place on GNU/Linux operating systems. \Sanzang also runs on
|
7
|
-
JRuby, although the runtime performance is usually slower than MRI
|
8
|
-
has not been tested on other
|
7
|
+
JRuby, although the runtime performance is usually slower than MRI, and text
|
8
|
+
encoding support is limited to UTF-8. \Sanzang has not been tested on other
|
9
|
+
Ruby implementations such as Rubinius.
|
9
10
|
|
10
11
|
== Languages and scope
|
11
12
|
|
data/lib/sanzang/platform.rb
CHANGED
@@ -101,13 +101,16 @@ module Sanzang::Platform
|
|
101
101
|
# converter implementations for obscure encodings.
|
102
102
|
#
|
103
103
|
def valid_encodings
|
104
|
+
if RUBY_PLATFORM == "java"
|
105
|
+
return [Encoding::UTF_8]
|
106
|
+
end
|
104
107
|
Encoding.list.find_all do |e|
|
105
108
|
begin
|
106
109
|
Encoding::Converter.search_convpath(e, Encoding::UTF_8)
|
107
110
|
true
|
108
111
|
rescue Encoding::ConverterNotFoundError
|
109
112
|
e == Encoding::UTF_8 ? true : false
|
110
|
-
rescue
|
113
|
+
rescue
|
111
114
|
false
|
112
115
|
end
|
113
116
|
end.sort_by! {|e| e.to_s.upcase }
|
@@ -127,6 +130,8 @@ module Sanzang::Platform
|
|
127
130
|
encoding
|
128
131
|
elsif Encoding.default_external.to_s =~ /ASCII|IBM/
|
129
132
|
Encoding::UTF_8
|
133
|
+
elsif RUBY_PLATFORM == "java"
|
134
|
+
Encoding::UTF_8
|
130
135
|
else
|
131
136
|
Encoding.default_external
|
132
137
|
end
|
data/lib/sanzang/translator.rb
CHANGED
@@ -113,8 +113,10 @@ module Sanzang
|
|
113
113
|
buffer = ""
|
114
114
|
end
|
115
115
|
end
|
116
|
-
|
117
|
-
|
116
|
+
|
117
|
+
newline = "\n".encode!(buffer.encoding)
|
118
|
+
io_out.write(gen_listing(buffer,
|
119
|
+
io_in.lineno - buffer.rstrip.count(newline)))
|
118
120
|
ensure
|
119
121
|
if input.kind_of?(String) and defined?(io_in) and io_in
|
120
122
|
io_in.close if not io_in.closed?
|
data/lib/sanzang/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lapis Lazuli Texts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|