debase 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 352d91f43143f540d4574637d8947567878edd3b
4
- data.tar.gz: be678b9761b4652414433eb43848eaf807542e5b
3
+ metadata.gz: a95c15c1c84f5b6eec31368db15ee3ba9c055df8
4
+ data.tar.gz: 22a15f0c12539595d0c792b3adaf4f1336bd47ce
5
5
  SHA512:
6
- metadata.gz: 2da8fa606defb081abae519eda7d36c016a33eb01435b4c0c0a64b5add87d548d12cec3ba3d52923b464a13477464027a245c85aa8ddbb4110ed7b310366da19
7
- data.tar.gz: 5c90a828b055619460d88f991c80f6c2d46f52608066ad03251b39c2e472ddd65c71feb4b4fd7bdddb74a69b8ebc760d5000b3c545fe0362cb1112109f4b837e
6
+ metadata.gz: e83a6b90dc4703c6a657a59ac17cd53136d0b30aa5e015974f249c84a624a76f8bba40a7aca82b5055befb69e4120dc7d6fa49e2b47910ed525d19d2ab1c3665
7
+ data.tar.gz: ee31346302ca064a5c4f1a1625064c881282b6d7bb2f139cbd35a207faa9882ef78edc77e7e4807ca633536353787017b4070d7a726efb53e5b5602c6b3fcbd6
@@ -335,7 +335,10 @@ Context_stop_frame(VALUE self, VALUE frame)
335
335
  Data_Get_Struct(self, debug_context_t, debug_context);
336
336
  if(FIX2INT(frame) < 0 && FIX2INT(frame) >= debug_context->stack_size)
337
337
  rb_raise(rb_eRuntimeError, "Stop frame is out of range.");
338
- debug_context->stop_frame = debug_context->stack_size - FIX2INT(frame);
338
+ /* we decrease stack size by frame and 1 because we use stop_frame after
339
+ updating stack size. If that code will be changed this should be changed accordingly.
340
+ */
341
+ debug_context->stop_frame = debug_context->calced_stack_size - FIX2INT(frame) - 1;
339
342
 
340
343
  return frame;
341
344
  }
@@ -285,10 +285,13 @@ process_return_event(VALUE trace_point, void *data)
285
285
 
286
286
  --context->calced_stack_size;
287
287
  update_stack_size(context);
288
- if(context->stack_size == context->stop_frame)
288
+ /* it is important to check stop_frame after stack size updated
289
+ if the order will be changed change Context_stop_frame accordingly.
290
+ */
291
+ if(context->calced_stack_size == context->stop_frame)
289
292
  {
290
- context->stop_next = 1;
291
- context->stop_frame = 0;
293
+ context->stop_next = 1;
294
+ context->stop_frame = -1;
292
295
  }
293
296
 
294
297
 
@@ -1,3 +1,3 @@
1
1
  module Debase
2
- VERSION = "0.1.5" unless defined? VERSION
2
+ VERSION = "0.1.6" unless defined? VERSION
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: debase
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis Ushakov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-02 00:00:00.000000000 Z
11
+ date: 2015-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase-ruby_core_source