ruby-debug-base19x 0.11.30.pre5 → 0.11.30.pre6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/ext/ruby_debug/ruby_debug.c +23 -16
  2. metadata +9 -9
@@ -9,7 +9,7 @@
9
9
  #include <insns_info.inc>
10
10
  #include "ruby_debug.h"
11
11
 
12
- #define DEBUG_VERSION "0.11.30.pre5"
12
+ #define DEBUG_VERSION "0.11.30.pre6"
13
13
 
14
14
  #define FRAME_N(n) (&debug_context->frames[debug_context->stack_size-(n)-1])
15
15
  #define GET_FRAME (FRAME_N(check_frame_number(debug_context, frame)))
@@ -510,18 +510,6 @@ save_call_frame(rb_event_flag_t _event, debug_context_t *debug_context, VALUE se
510
510
  copy_scalar_args(debug_frame);
511
511
  }
512
512
 
513
- char*
514
- resolve_symlink(char *file) {
515
- char *result;
516
- #ifdef PATH_MAX
517
- result = (char*)malloc(PATH_MAX);
518
- #else
519
- result = NULL;
520
- #endif
521
- return realpath(file, result);
522
- }
523
-
524
-
525
513
  #if defined DOSISH
526
514
  #define isdirsep(x) ((x) == '/' || (x) == '\\')
527
515
  #else
@@ -530,9 +518,28 @@ resolve_symlink(char *file) {
530
518
 
531
519
  int
532
520
  filename_cmp(VALUE source, char *file) {
533
- char* path;
534
- path = RTEST(resolve_symlinks) ? resolve_symlink(file) : file;
535
- return filename_cmp_impl(source, path);
521
+ if (!RTEST(resolve_symlinks)) {
522
+ return filename_cmp_impl(source, file);
523
+ }
524
+
525
+ #ifdef PATH_MAX
526
+ {
527
+ char path[PATH_MAX + 1];
528
+ path[PATH_MAX] = 0;
529
+
530
+ if (realpath(source, path) != NULL)
531
+ return filename_cmp_impl(source, path);
532
+ else
533
+ return filename_cmp_impl(source, file);
534
+ }
535
+ #else
536
+ {
537
+ char *path = realpath(file, NULL);
538
+ result = filename_cmp_impl(source, path == NULL ? file : path);
539
+ free(path);
540
+ return result;
541
+ }
542
+ #endif
536
543
  }
537
544
 
538
545
  int
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-debug-base19x
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.30.pre5
4
+ version: 0.11.30.pre6
5
5
  prerelease: 8
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-01-13 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: columnize
16
- requirement: &70326957146380 !ruby/object:Gem::Requirement
16
+ requirement: &70171592485580 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.3.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70326957146380
24
+ version_requirements: *70171592485580
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: ruby_core_source
27
- requirement: &70326957145900 !ruby/object:Gem::Requirement
27
+ requirement: &70171592485100 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.1.4
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70326957145900
35
+ version_requirements: *70171592485100
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: linecache19
38
- requirement: &70326957145420 !ruby/object:Gem::Requirement
38
+ requirement: &70171592484620 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.5.11
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70326957145420
46
+ version_requirements: *70171592484620
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
- requirement: &70326957144960 !ruby/object:Gem::Requirement
49
+ requirement: &70171592484160 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: 0.8.1
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70326957144960
57
+ version_requirements: *70171592484160
58
58
  description: ! 'ruby-debug is a fast implementation of the standard Ruby debugger
59
59
  debug.rb.
60
60