simple_english 0.4.0 → 0.4.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 706801ef7861107694a40cc9671788179c54ea4ac4755491c92df1dd174da41b
4
- data.tar.gz: 162d45ec0d0c979c855b49f8f639f0d679e5575f4b3e789453f3f01287feda63
3
+ metadata.gz: 70c669ec0be5be6b79c011236f4f54137d399e4b8be06ead9a20ca2e2ea0f683
4
+ data.tar.gz: 6a67aa7cf3cab9a5187911ca40de39f1366ed11e80bee913b32527f5c376fc9f
5
5
  SHA512:
6
- metadata.gz: 99b3510be0ae0327886b9cb8be7b4c008eaf8346091bf306423b5e2306c9896eea63d26c629b1a3b96cd2111d306834fedb368e7e1af3702bf5bf61bf3b1443a
7
- data.tar.gz: 61840d3678edcc0e18a04db4c291935823a3d5aa139609ca5979a1b513c2420097645241aaa602cb5e2b009c31a1cc54da084f92641a0aba2795febefffe39dd
6
+ metadata.gz: '078dc707335ac5a3b0e9b48054ba308c1d32c91b8ef9d3f5f37c577907e4cd74a121c8a221a5c8a829e762204e2f1a72a6e52090f0fded27b256b892fbdb0d68'
7
+ data.tar.gz: b6f84dea9be787d81e0206c11219350ba7113ba53f44d222ceab1b4c0a1f87d98c53d5c0344164a0287f988d7c9fb7d7b22894a63b8573ceb619279a62fe3a2d
@@ -218,7 +218,11 @@ module SimpleEnglish
218
218
  # and LT itself rejects duplicate ids at load, so no dedup is
219
219
  # needed here.
220
220
  def rule_ids(path = RULES_FILE)
221
- File.read(path).scan(/<(?:rule|rulegroup)\b[^>]*>/).filter_map do |tag|
221
+ # Explicit UTF-8: the file holds non-ASCII bytes, and a bare
222
+ # File.read uses the process's external encoding. Under
223
+ # launchd that is US-ASCII, and the scan below dies on the
224
+ # first such byte. The daemon must boot in any locale.
225
+ File.read(path, encoding: "UTF-8").scan(/<(?:rule|rulegroup)\b[^>]*>/).filter_map do |tag|
222
226
  tag[/\bid="([^"]+)"/, 1]
223
227
  end
224
228
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimpleEnglish
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_english
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - TonyCTHsu
@@ -165,7 +165,7 @@ licenses:
165
165
  metadata:
166
166
  homepage_uri: https://github.com/TonyCTHsu/simple-english
167
167
  source_code_uri: https://github.com/TonyCTHsu/simple-english
168
- changelog_uri: https://github.com/TonyCTHsu/simple-english/blob/v0.4.0/CHANGELOG.md
168
+ changelog_uri: https://github.com/TonyCTHsu/simple-english/blob/v0.4.1/CHANGELOG.md
169
169
  post_install_message:
170
170
  rdoc_options: []
171
171
  require_paths: