php_embed 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -160,12 +160,13 @@ VALUE convert_value_to_php_string(VALUE v) {
160
160
  {
161
161
  VALUE ret = rb_str_new_cstr("array(");
162
162
  VALUE ary = rb_ary_new();
163
+ VALUE *p;
163
164
  int i, len;
164
165
 
165
166
  rb_hash_foreach(v, hash_to_php_string_array, ary);
166
167
 
167
168
  len = RARRAY_LEN(ary);
168
- VALUE* p = RARRAY_PTR(ary);
169
+ p = RARRAY_PTR(ary);
169
170
  for(i=0; i<len; ++i) {
170
171
  rb_str_cat2(ret, StringValuePtr(p[i]));
171
172
  if (i != len-1) {
data/ext/php_embed/php.c CHANGED
@@ -174,7 +174,7 @@ VALUE php_require(VALUE self, VALUE file) {
174
174
  VALUE retval = Qtrue;
175
175
  zend_file_handle handle;
176
176
 
177
- if (TYPE(file) == T_STRING) {
177
+ if (TYPE(file) != T_STRING) {
178
178
  rb_raise(rb_eArgError, "file must be string");
179
179
  return Qnil;
180
180
  }
@@ -1,3 +1,3 @@
1
1
  module PhpEmbed
2
- VERSION = "0.1.2"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: php_embed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: