debase 0.1.1 → 0.1.2

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: ab4c1a3fa6cecc8d387e633d5d6c04e92313146d
4
- data.tar.gz: d2c68c54556089a103d841b8e66249a7a265ca61
3
+ metadata.gz: 6db61940f1aaef2f04f52469fa21fdf00513daea
4
+ data.tar.gz: 9d32ec37844e491ca6c84042b0c8cb18135cde40
5
5
  SHA512:
6
- metadata.gz: 6e35e3ff5d5393f85099189747f2122eae3ae7986a0a134ac5a472fbd943a09dcfee5fac80d3ae0399c19d0aa0a079f2542354d8f21b4d19e218c7672105e783
7
- data.tar.gz: 427cd58b99208644f613d11417a7987513a0c647b5a92a0b7277e08e79b9f55e3118d9e1404947c178dfded9be23e8829ca75eebe8ed45258183779557f83acf
6
+ metadata.gz: 053810fcee3048a773d6fba24960288f08d4cec893c9aacc346368a36fe99f7cd3c487482e6e25e880f5ae09382e0371011213654a3903cf1c8cf0a6186977d1
7
+ data.tar.gz: e88dd24fcd59c59ecb22997f7478b090cfb7ef681ecf3b22c9189a8c2a8feda44417d2f68df75d55d9a866300a38ed209d39140a5615fc3c28e1bb2b8c382507
@@ -2,4 +2,5 @@ language: ruby
2
2
  rvm:
3
3
  - ruby-head
4
4
  - 2.0.0
5
- - 2.1.4
5
+ - 2.1
6
+ - 2.2
data/Rakefile CHANGED
@@ -13,9 +13,11 @@ task :clean do
13
13
  derived_files = Dir.glob(".o") + Dir.glob("*.so") + Dir.glob("*.bundle")
14
14
  rm derived_files unless derived_files.empty?
15
15
  end
16
- cd 'pkg' do
17
- derived_files = Dir.glob('*.gem')
18
- rm derived_files unless derived_files.empty?
16
+ if File.exists?('pkg')
17
+ cd 'pkg' do
18
+ derived_files = Dir.glob('*.gem')
19
+ rm derived_files unless derived_files.empty?
20
+ end
19
21
  end
20
22
  end
21
23
 
@@ -35,4 +37,4 @@ Rake::TestTask.new(:test) do |t|
35
37
  end
36
38
  task :test => :lib
37
39
 
38
- task :default => :test
40
+ task :default => :test
@@ -33,7 +33,7 @@ catchpoint_hit_count(VALUE catchpoints, VALUE exception, VALUE *exception_name)
33
33
  hit_count = rb_hash_aref(catchpoints, mod_name);
34
34
  if(hit_count != Qnil)
35
35
  {
36
- *exception_name = mod_name;
36
+ *exception_name = mod_name;
37
37
  return hit_count;
38
38
  }
39
39
  }
@@ -298,9 +298,9 @@ process_raise_event(VALUE trace_point, void *data)
298
298
  if (!check_start_processing(context, rb_thread_current())) return;
299
299
 
300
300
  update_stack_size(context);
301
- if (catchpoint_hit_count(catchpoints, rb_errinfo(), &exception_name) != Qnil) {
301
+ tp = TRACE_POINT;
302
+ if (catchpoint_hit_count(catchpoints, rb_tracearg_raised_exception(tp), &exception_name) != Qnil) {
302
303
  rb_ensure(start_inspector, context_object, stop_inspector, Qnil);
303
- tp = TRACE_POINT;
304
304
  path = rb_tracearg_path(tp);
305
305
  lineno = rb_tracearg_lineno(tp);
306
306
  file = RSTRING_PTR(path);
@@ -22,6 +22,9 @@ unless ARGV.any? {|arg| arg.include?('--with-ruby-include') }
22
22
  end
23
23
 
24
24
  require "mkmf"
25
+
26
+ RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
27
+
25
28
  require "debase/ruby_core_source"
26
29
 
27
30
  hdrs = proc {
@@ -13,7 +13,7 @@ module Debase
13
13
  @breakpoints = []
14
14
  Rubinius::CodeLoader.compiled_hook.add proc { |script|
15
15
  @breakpoints.each { | b |
16
- if (b.source == script.file_path)
16
+ if b.source == script.file_path
17
17
  exec, ip = script.compiled_code.locate_line(b.pos)
18
18
  if exec
19
19
  exec.set_breakpoint ip, b
@@ -35,7 +35,7 @@ module Debase
35
35
  end
36
36
 
37
37
  def cleanup_contexts
38
- @contexts.delete_if { |key, value| !key.alive? }
38
+ @contexts.delete_if { |key, _| !key.alive? }
39
39
  end
40
40
 
41
41
  def contexts
@@ -12,5 +12,15 @@ module Debase
12
12
  @id = @@global_id
13
13
  @@global_id = @@global_id + 1
14
14
  end
15
+
16
+ def delete!
17
+
18
+ end
19
+
20
+ def self.remove(breakpoints, id)
21
+ bp = breakpoints.delete_if {|b| b.id == id}
22
+ bp.delete! if bp
23
+ bp
24
+ end
15
25
  end
16
26
  end
@@ -1,3 +1,3 @@
1
1
  module Debase
2
- VERSION = "0.1.1" unless defined? VERSION
2
+ VERSION = "0.1.2" 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.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis Ushakov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-10 00:00:00.000000000 Z
11
+ date: 2015-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase-ruby_core_source