sanzang 1.0.8 → 1.0.9

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: 02df4608ca9a12c096a4ab7dc91c972c70652977
4
- data.tar.gz: eb9f6ea45c05aa404d41af5586f9de52bf463b12
3
+ metadata.gz: 988a94b60e0d495fa6acc7d549db71651c120ede
4
+ data.tar.gz: d7ee8eea313da3675d0bf361187a28bf29b1d5d6
5
5
  SHA512:
6
- metadata.gz: f09ffb33b6a25ea423e53d9f675b857554edc1f819a29a2b6487f050a5035f6fa2a33acbb01fbbc1def817fe267cf9133d31340ae9af0e796e9d7793cdf151ba
7
- data.tar.gz: d4502378f5c920209a791dd0fbe93218acf3244f61b13ba072dff1e81aefa7a64ea40be6d97719e326a541b5d807473fb5472f3c5a6890a3f9b1ddaa578db07a
6
+ metadata.gz: d87950bf395184c0cb2ac661810d97f07bf36669c7366c556850f9e85cf51f05280c817b2bafa3c37c9b0ba30dfcf895b91c9372d672bc654f5e4d8063cbb706
7
+ data.tar.gz: 1df1b05c839c2f55ff0f85f96b08676ee9335c8a96aaf73cb137d0ff9963e4bd10c1401145c5959232d8e955d1f59d9572ddc1d781b846d42003a085c4b81375
@@ -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. \Sanzang
8
- has not been tested on other Ruby implementations such as Rubinius.
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
 
@@ -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 TypeError
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
@@ -113,8 +113,10 @@ module Sanzang
113
113
  buffer = ""
114
114
  end
115
115
  end
116
- io_out.write(
117
- gen_listing(buffer, io_in.lineno - buffer.rstrip.count("\n")))
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?
@@ -19,6 +19,6 @@ module Sanzang
19
19
 
20
20
  # Current version number of Sanzang
21
21
  #
22
- VERSION = "1.0.8"
22
+ VERSION = "1.0.9"
23
23
 
24
24
  end
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.8
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-27 00:00:00.000000000 Z
11
+ date: 2013-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel