unibits 1.2.0 → 1.2.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
  SHA1:
3
- metadata.gz: a0d2c78485e3fa534c3dcd45053880ee335c6903
4
- data.tar.gz: 32f99ecc52618c3578fc85b99564a124a64cf1f6
3
+ metadata.gz: aaa02cdde7f1c57640368a8469d287976196eba9
4
+ data.tar.gz: e5d47e0b09a8fda618ea27f312383b47ac36687b
5
5
  SHA512:
6
- metadata.gz: 41ddb5833f8e6b356ddbc866df640452c3b62b6dc427c4b236533812749997b27f70446732355f6fdace9eb361307d358801bd16ee664f892188cf5524026b33
7
- data.tar.gz: beb327d7946a08655d7b794a70f9d848227dad43c4d8d6f017bb81449e780ea0796995259cbd54b8535a9c1ea4e96e6bbed1e0695ac6f40c9d9ca1b6f18a774d
6
+ metadata.gz: '08591b3e02adcae96a8610e9fb6532cb6593e6257c1a2f959b2fb9e6b0df8ce6f9f4cd4e21c82fa0a6f43e6cfaf94c723801d9b8510293456102ff4aa536a6ae'
7
+ data.tar.gz: cf81d951546a3c2a339a461f721b35215080959c07d692786954526589337a4172c6dc7e5b7ca9b21eee1fdea2bab74ad3f930adbc7211338b71b207a73b4c9e
@@ -1,5 +1,9 @@
1
1
  ## CHANGELOG
2
2
 
3
+ ### 1.2.1
4
+
5
+ * Fix bug that inserted wrong bytes
6
+
3
7
  ### 1.2.0
4
8
 
5
9
  * Do not display (but highlight) unassigned codepoints
@@ -80,6 +80,8 @@ module Unibits
80
80
  def self.symbolify(char, encoding = char.encoding)
81
81
  return "n/a" if Unicode::Categories.category(char) == "Cn"
82
82
 
83
+ char = char.dup
84
+
83
85
  char.tr!(
84
86
  ASCII_CONTROL_CODEPOINTS.encode(encoding),
85
87
  ASCII_CONTROL_SYMBOLS.encode(encoding)
@@ -1,3 +1,3 @@
1
1
  module Unibits
2
- VERSION = "1.2.0".freeze
2
+ VERSION = "1.2.1".freeze
3
3
  end
@@ -233,4 +233,13 @@ describe Unibits do
233
233
  (result[/^.*$/].size <= 50).must_equal true
234
234
  end
235
235
  end
236
+
237
+ describe "bugs / edge cases" do
238
+ it "should render ASCII space (U+20) as one byte [gh #1]" do
239
+ string = "\u{1f32b} abc"
240
+ result = Paint.unpaint(Unibits.visualize(string))
241
+ result.wont_match /20.*20.*5B/m
242
+ result.must_match /F0.*9F.*8C.*AB.*20.*61.*62.*63/m
243
+ end
244
+ end
236
245
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unibits
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Lelis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-08 00:00:00.000000000 Z
11
+ date: 2017-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paint