clj 0.0.4.3 → 0.0.4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/clj/parser.rb +1 -1
  2. data/lib/clj/types.rb +5 -1
  3. metadata +3 -3
@@ -171,7 +171,7 @@ class Parser < StringScanner
171
171
  end
172
172
 
173
173
  if bytes.respond_to? :force_encoding
174
- bytes.force_encoding 'UTF-16be'
174
+ bytes.force_encoding 'UTF-16'
175
175
  bytes.encode 'UTF-8'
176
176
  else
177
177
  bytes
@@ -32,7 +32,11 @@ end
32
32
 
33
33
  class String
34
34
  def to_clj (options = {})
35
- result = inspect
35
+ result = if respond_to? :encode
36
+ encode('UTF-16').inspect
37
+ else
38
+ inspect
39
+ end
36
40
 
37
41
  result.gsub!(/(^|[^\\])\\e/, '\1\u001b')
38
42
  result.gsub!(/(^|[^\\])\\a/, '\1\u0003')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clj
3
3
  version: !ruby/object:Gem::Version
4
- hash: 89
4
+ hash: 87
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
9
  - 4
10
- - 3
11
- version: 0.0.4.3
10
+ - 4
11
+ version: 0.0.4.4
12
12
  platform: ruby
13
13
  authors:
14
14
  - meh.