charlock_holmes 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- charlock_holmes (0.3.0)
4
+ charlock_holmes (0.4.0)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -195,12 +195,12 @@ static VALUE rb_get_supported_encodings(VALUE klass)
195
195
  const char *enc_name;
196
196
  int32_t enc_name_len;
197
197
 
198
- csd = ucsdet_open(&status);
199
-
200
198
  rb_encoding_list = rb_iv_get(klass, "encoding_list");
201
199
 
202
200
  // lazily populate the list
203
201
  if (NIL_P(rb_encoding_list)) {
202
+ csd = ucsdet_open(&status);
203
+
204
204
  encoding_list = ucsdet_getAllDetectableCharsets(csd, &status);
205
205
  rb_encoding_list = rb_ary_new();
206
206
  enc_count = uenum_count(encoding_list, &status);
@@ -211,10 +211,9 @@ static VALUE rb_get_supported_encodings(VALUE klass)
211
211
  }
212
212
 
213
213
  rb_iv_set(klass, "encoding_list", rb_encoding_list);
214
+ ucsdet_close(csd);
214
215
  }
215
216
 
216
- ucsdet_close(csd);
217
-
218
217
  return rb_encoding_list;
219
218
  }
220
219
 
@@ -1,3 +1,3 @@
1
1
  module CharlockHolmes
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: charlock_holmes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -15,7 +15,7 @@ default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rake-compiler
18
- requirement: &70365951363440 !ruby/object:Gem::Requirement
18
+ requirement: &70218132232740 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ! '>='
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: 0.7.5
24
24
  type: :development
25
25
  prerelease: false
26
- version_requirements: *70365951363440
26
+ version_requirements: *70218132232740
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
- requirement: &70365951362940 !ruby/object:Gem::Requirement
29
+ requirement: &70218114472220 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ! '>='
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: 2.0.0
35
35
  type: :development
36
36
  prerelease: false
37
- version_requirements: *70365951362940
37
+ version_requirements: *70218114472220
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: chardet
40
- requirement: &70365951394040 !ruby/object:Gem::Requirement
40
+ requirement: &70218114471840 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ! '>='
@@ -45,7 +45,7 @@ dependencies:
45
45
  version: '0'
46
46
  type: :development
47
47
  prerelease: false
48
- version_requirements: *70365951394040
48
+ version_requirements: *70218114471840
49
49
  description:
50
50
  email: seniorlopez@gmail.com
51
51
  executables: []