tex2id 1.4.0 → 1.4.1

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
  SHA256:
3
- metadata.gz: 4dad00dd189b68420286a665d46d5747c7354e05b9daa9bfad36208e30732da2
4
- data.tar.gz: 32f88f87b3bc74c14b0d465b70a8770ee9956cd35de5a0f54b7115a22a7c7c08
3
+ metadata.gz: f56bc5e09157b4915d2f458de3d2dedd59717308cd162fbebee5137477ede8cd
4
+ data.tar.gz: b529dfa019139b2f245a2c7b8321e158d8ebd5f5f53315711a8bfaa51ffd98a9
5
5
  SHA512:
6
- metadata.gz: 4d2d8a3771820624223bbbaaf080d9ad8bfba91994fcf368997bedba2e28885c29fcfad493b0b4c897073ebf8b6c13b6b6dd466ad1ad449bc23b49e599456aec
7
- data.tar.gz: b1118c58521ca06af0727d433f01cfa6c73329520c5bb921e6807301568d559cf2c8807eac70a580ac8988bcb1b56e7d5e6151c09718c85712ed281c2c85b2f3
6
+ metadata.gz: e598ad2e760a8c736b87b5bc8d12d506dabd241452af42cf8da555da5c1e83db741f98dc6b31942fe4a91d6869562a911febb63af0a0d4db49eb3724a0e28c49
7
+ data.tar.gz: ec6085ee4b184999f1179a49144b8126af8014122da99b2fd2aa43c120163d0e1d2e7740702e5442c6e2757bed08fc5bad9686c01ca73ead6c8bde05e71f904a
data/lib/tex2id/cli.rb CHANGED
@@ -43,27 +43,22 @@ Usage: #{$0} <source_file> [<output_file>]
43
43
  def source
44
44
  case source_file
45
45
  when "-"
46
- $stdin.set_encoding("Windows-31J:UTF-8")
47
46
  $stdin.read
48
47
  else
49
- IO.read(source_file, mode: 'r:Windows-31J:UTF-8')
48
+ IO.read(source_file, mode: 'r')
50
49
  end
51
50
  end
52
51
 
53
52
  def with_output_file_io
54
53
  begin
55
54
  io = if output_file
56
- File.open(output_file, 'w:Windows-31J:UTF-8')
55
+ File.open(output_file, 'w')
57
56
  else
58
- $stdout.set_encoding("Windows-31J")
57
+ $stdout
59
58
  end
60
59
  yield io
61
60
  ensure
62
- if output_file
63
- io.close
64
- else
65
- $stdout.set_encoding("UTF-8")
66
- end
61
+ io.close if output_file
67
62
  end
68
63
  end
69
64
 
@@ -1,3 +1,3 @@
1
1
  module Tex2id
2
- VERSION = "1.4.0"
2
+ VERSION = "1.4.1"
3
3
  end
data/lib/tex2id.rb CHANGED
@@ -2,7 +2,7 @@ require "tex2id/version"
2
2
 
3
3
  module Tex2id
4
4
  def self.convert(source_filename)
5
- source = IO.read(source_filename, mode: 'r:Windows-31J:UTF-8')
5
+ source = IO.read(source_filename, mode: 'r')
6
6
  Converter.new(source).convert
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tex2id
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenta Murata