ruby-lxc 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/ext/lxc/lxc.c +3 -2
  2. data/lib/lxc/version.rb +1 -1
  3. metadata +2 -2
data/ext/lxc/lxc.c CHANGED
@@ -993,7 +993,7 @@ container_cgroup_item(VALUE self, VALUE rb_key)
993
993
  static VALUE
994
994
  container_config_item(VALUE self, VALUE rb_key)
995
995
  {
996
- int len1, len2;
996
+ int len1, len2, mlines;
997
997
  char *key, *value;
998
998
  struct container_data *data;
999
999
  struct lxc_container *container;
@@ -1017,10 +1017,11 @@ container_config_item(VALUE self, VALUE rb_key)
1017
1017
  rb_raise(Error, "unable to read configuration file");
1018
1018
  }
1019
1019
  rb_config = rb_str_new2(value);
1020
+ mlines = value[len2-1] == '\n';
1020
1021
  free(value);
1021
1022
 
1022
1023
  /* Return a list in case of multiple lines */
1023
- return value[len2-1] == '\n' ? rb_str_split(rb_config, "\n") : rb_config;
1024
+ return mlines ? rb_str_split(rb_config, "\n") : rb_config;
1024
1025
  }
1025
1026
 
1026
1027
  /*
data/lib/lxc/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module LXC
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-lxc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-20 00:00:00.000000000 Z
12
+ date: 2014-03-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake-compiler