rb-libsvm 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -2,5 +2,6 @@ rvm:
2
2
  - 1.8.7
3
3
  - 1.9.2
4
4
  - 1.9.3
5
+ - 2.0.0
5
6
  - rbx-18mode
6
7
  - rbx-19mode
data/ext/libsvm/libsvm.c CHANGED
@@ -340,11 +340,13 @@ static VALUE cModel_predict(VALUE obj,VALUE example) {
340
340
  struct svm_node *x;
341
341
  struct svm_model *model;
342
342
  double class;
343
-
343
+
344
344
  x = example_to_internal(example);
345
345
  Data_Get_Struct(obj, struct svm_model, model);
346
346
  class = svm_predict(model, x);
347
-
347
+
348
+ free(x);
349
+
348
350
  return rb_float_new(class);
349
351
  }
350
352
 
@@ -371,6 +373,7 @@ static VALUE cModel_predict_probability(VALUE obj,VALUE example) {
371
373
  rb_ary_push(estimates, rx_from_double(c_estimates[i]));
372
374
 
373
375
  free(c_estimates);
376
+ free(x);
374
377
 
375
378
  target = rb_ary_new();
376
379
  rb_ary_push(target, rb_float_new(class));
@@ -1,3 +1,3 @@
1
1
  module Libsvm
2
- VERSION = "1.1.2"
2
+ VERSION = "1.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rb-libsvm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-03-09 00:00:00.000000000 Z
13
+ date: 2013-03-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake-compiler
@@ -93,7 +93,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
93
93
  version: '0'
94
94
  segments:
95
95
  - 0
96
- hash: 1035372475965383515
96
+ hash: 4124111436623898286
97
97
  required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  none: false
99
99
  requirements:
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  version: '0'
103
103
  segments:
104
104
  - 0
105
- hash: 1035372475965383515
105
+ hash: 4124111436623898286
106
106
  requirements: []
107
107
  rubyforge_project: rb-libsvm
108
108
  rubygems_version: 1.8.23