duktape 0.11.0.0 → 1.0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@
4
4
  static VALUE mDuktape;
5
5
  static VALUE cContext;
6
6
  static VALUE eContextError;
7
- static void error_handler(duk_context *, int);
7
+ static void error_handler(duk_context *, int, const char *);
8
8
 
9
9
  static void ctx_dealloc(void *ctx)
10
10
  {
@@ -22,7 +22,7 @@ static VALUE ctx_stack_to_value(duk_context *ctx, int index)
22
22
  size_t len;
23
23
  const char *buf;
24
24
  int type;
25
-
25
+
26
26
  type = duk_get_type(ctx, index);
27
27
  switch (type) {
28
28
  case DUK_TYPE_NULL:
@@ -162,10 +162,10 @@ static VALUE ctx_call_prop(int argc, VALUE* argv, VALUE self)
162
162
  return res;
163
163
  }
164
164
 
165
- static void error_handler(duk_context *ctx, int code)
165
+ static void error_handler(duk_context *ctx, int code, const char *msg)
166
166
  {
167
167
  duk_set_top(ctx, 0);
168
- rb_raise(eContextError, "fatal duktape error: %d", code);
168
+ rb_raise(eContextError, "fatal duktape error: %s (%d)", msg, code);
169
169
  }
170
170
 
171
171
  void Init_duktape_ext()
@@ -181,4 +181,3 @@ void Init_duktape_ext()
181
181
  rb_define_method(cContext, "get_prop", ctx_get_prop, 1);
182
182
  rb_define_method(cContext, "call_prop", ctx_call_prop, -1);
183
183
  }
184
-
@@ -1,4 +1,3 @@
1
1
  module Duktape
2
- VERSION = "0.11.0.0"
2
+ VERSION = "1.0.2.0"
3
3
  end
4
-
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: duktape
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0.0
4
+ version: 1.0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Magnus Holm
@@ -17,6 +17,8 @@ extensions:
17
17
  - ext/duktape/extconf.rb
18
18
  extra_rdoc_files: []
19
19
  files:
20
+ - CHANGELOG.md
21
+ - README.md
20
22
  - ext/duktape/duktape.c
21
23
  - ext/duktape/duktape.h
22
24
  - ext/duktape/duktape_ext.c