aozora 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -206,7 +206,10 @@ class Aozora
206
206
  def read_file(title, length)
207
207
  dir = File.expand_path(File.dirname(__FILE__))
208
208
  filename = dir+"/../../data/#{title}.txt"
209
- File.open(filename) do |full_sign|
209
+
210
+ # Ruby1.9(Linux)版への回避策。UTF-8を指定する
211
+ # File.open(filename) do |full_sign|
212
+ File.open(filename, "r:utf-8") do |full_sign|
210
213
  text = String.new
211
214
  loop do
212
215
  while (line = full_sign.gets) == nil
@@ -1,3 +1,3 @@
1
1
  class Aozora
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aozora
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
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-09-23 00:00:00.000000000 Z
12
+ date: 2013-10-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler